Browse Source

change variable

itizawa 6 years ago
parent
commit
d8414f2ed9

+ 2 - 2
src/client/js/components/PageComment/CommentEditor.jsx

@@ -96,14 +96,14 @@ class CommentEditor extends React.Component {
       event.preventDefault();
     }
 
-    if (this.props.reEdit) {
+    if (this.props.currentCommentId != null) {
       this.props.commentContainer.putComment(
         this.state.comment,
         this.state.isMarkdown,
         this.props.replyTo,
         this.props.commentContainer.state.isSlackEnabled,
         this.props.commentContainer.state.slackChannels,
-        this.props.currentComment,
+        this.props.currentCommentId,
       );
     }
 

+ 2 - 2
src/client/js/services/CommentContainer.js

@@ -103,8 +103,8 @@ export default class CommentContainer extends Container {
   /**
    * Load data of comments and rerender <PageComments />
    */
-  putComment(comment, isMarkdown, replyTo, isSlackEnabled, slackChannels, prevComment) {
-    console.log(prevComment);
+  putComment(comment, isMarkdown, replyTo, isSlackEnabled, slackChannels, commentId) {
+    console.log(commentId);
   }
 
   deleteComment(comment) {