shinoka7 6 yıl önce
ebeveyn
işleme
a5530c8a90

+ 4 - 3
src/client/js/components/PageComment/Comment.jsx

@@ -39,8 +39,10 @@ export default class Comment extends React.Component {
   }
 
   showForm() {
-    this.setState({
-      showCommentForm: true,
+    this.setState((prevState) => {
+      return {
+        showCommentForm: !prevState.showCommentForm,
+      };
     });
   }
 
@@ -127,7 +129,6 @@ export default class Comment extends React.Component {
     const comment = this.props.comment;
     const creator = comment.creator;
     const isMarkdown = comment.isMarkdown;
-    // const indentPixels = typeof (this.props.replyTo) !== 'undefined' ? '50px' : '0px';
 
     const rootClassName = this.getRootClassName();
     const commentDate = dateFnsFormat(comment.createdAt, 'YYYY/MM/DD HH:mm');

+ 0 - 1
src/client/js/components/PageComments.js

@@ -5,7 +5,6 @@ import PropTypes from 'prop-types';
 import { withTranslation } from 'react-i18next';
 import GrowiRenderer from '../util/GrowiRenderer';
 
-
 import Comment from './PageComment/Comment';
 import DeleteCommentModal from './PageComment/DeleteCommentModal';