itizawa 6 лет назад
Родитель
Сommit
b9d3eed378

+ 3 - 0
src/client/js/components/PageComment/CommentEditor.jsx

@@ -102,6 +102,9 @@ class CommentEditor extends React.Component {
       event.preventDefault();
     }
 
+    if (this.props.reEdit) {
+      this.props.commentContainer.putComment();
+    }
 
     this.props.commentContainer.postComment(
       this.state.comment,

+ 7 - 0
src/client/js/services/CommentContainer.js

@@ -100,6 +100,13 @@ export default class CommentContainer extends Container {
       });
   }
 
+  /**
+   * Load data of comments and rerender <PageComments />
+   */
+  putComment() {
+    console.log('ここはCommentContainer');
+  }
+
   deleteComment(comment) {
     return this.appContainer.apiPost('/comments.remove', { comment_id: comment._id })
       .then((res) => {