Kaynağa Gözat

rename onUpdate

yuto-oweseek 4 yıl önce
ebeveyn
işleme
62a9444bf9

+ 1 - 1
packages/app/src/components/PageComment.tsx

@@ -117,7 +117,7 @@ const PageComment:FC<Props> = memo((props:Props):JSX.Element => {
       growiRenderer={appContainer.getRenderer('comment')}
       deleteBtnClicked={onClickDeleteButton}
       comment={comment}
-      onUpdate={mutate}
+      onComment={mutate}
       isReadOnly={isReadOnly}
     />
   );

+ 2 - 2
packages/app/src/components/PageComment/Comment.jsx

@@ -176,7 +176,7 @@ class Comment extends React.PureComponent {
             onCancelButtonClicked={() => this.setState({ isReEdit: false })}
             onCommentButtonClicked={() => {
               this.setState({ isReEdit: false });
-              if (this.props.onUpdate != null) this.props.onUpdate();
+              if (this.props.onComment != null) this.props.onComment();
             }}
           />
         ) : (
@@ -238,7 +238,7 @@ Comment.propTypes = {
   isReadOnly: PropTypes.bool.isRequired,
   growiRenderer: PropTypes.object.isRequired,
   deleteBtnClicked: PropTypes.func.isRequired,
-  onUpdate: PropTypes.func,
+  onComment: PropTypes.func,
 };
 
 export default withTranslation()(CommentWrapper);