Просмотр исходного кода

fix isComment props

https://youtrack.weseek.co.jp/issue/GW-7773
- Remove isComment from state
- Remove isComment from PropTypes
- Re-implement isComment props in Editor component
I Komang Mudana 3 лет назад
Родитель
Сommit
f02726c895
1 измененных файлов с 1 добавлено и 3 удалено
  1. 1 3
      packages/app/src/components/PageComment/CommentEditor.jsx

+ 1 - 3
packages/app/src/components/PageComment/CommentEditor.jsx

@@ -62,7 +62,6 @@ class CommentEditor extends React.Component {
       isUploadableFile,
       errorMessage: undefined,
       isSlackConfigured: config.isSlackConfigured,
-      isComment: true,
     };
 
     this.updateState = this.updateState.bind(this);
@@ -312,7 +311,7 @@ class CommentEditor extends React.Component {
                 onChange={this.updateState}
                 onUpload={this.uploadHandler}
                 onCtrlEnter={this.ctrlEnterHandler}
-                isComment={this.state.isComment}
+                isComment
               />
               {/*
                 Note: <OptionsSelector /> is not optimized for ComentEditor in terms of responsive design.
@@ -418,7 +417,6 @@ CommentEditor.propTypes = {
   commentCreator: PropTypes.string,
   onCancelButtonClicked: PropTypes.func,
   onCommentButtonClicked: PropTypes.func,
-  isComment:  PropTypes.bool,
 };
 
 /**