Simpler fragments

This commit is contained in:
okbel
2018-03-01 14:12:07 -03:00
parent 3fd1d6705d
commit d1c0167e9a
11 changed files with 48 additions and 47 deletions
@@ -36,6 +36,7 @@ class Editor extends React.Component {
},
});
console.log('comment', this.props.comment);
// To edit comments and have the previous html comment
if (this.props.comment && this.props.comment.richTextBody) {
this.ref.content.innerHTML = this.props.comment.richTextBody;
@@ -6,6 +6,7 @@ export default {
slots: {
draftArea: [Editor],
commentContent: [CommentContent],
adminCommentContent: [CommentContent],
},
fragments: {
CreateCommentResponse: gql`
@@ -57,6 +58,7 @@ export default {
fragment: editCommentFragment,
id: fragmentId,
data: {
__typename: 'Comment',
richTextBody: edit.richTextBody,
},
});