Skip to content

Commit

Permalink
Comments: Cleanup unused component state in PostCommentList (#58584)
Browse files Browse the repository at this point in the history
* Comments: Use props instead of state for activeReplyCommentId

* Comments: Removed commentsFilter unused component state
  • Loading branch information
tyxla committed Dec 1, 2021
1 parent fb0095c commit 35512d0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions client/blocks/comments/post-comment-list.jsx
Expand Up @@ -87,7 +87,6 @@ class PostCommentList extends Component {

state = {
amountOfCommentsToTake: this.props.initialSize,
commentsFilter: 'all',
};

shouldFetchInitialComment = ( { startingCommentId, initialComment } ) => {
Expand Down Expand Up @@ -254,7 +253,7 @@ class PostCommentList extends Component {
recordGaEvent( 'Clicked Cancel Reply to Comment' );
this.props.recordReaderTracksEvent( 'calypso_reader_comment_reply_cancel_click', {
blog_id: this.props.post.site_ID,
comment_id: this.state.activeReplyCommentId,
comment_id: this.props.activeReplyCommentId,
} );
this.resetActiveReplyComment();
};
Expand Down

0 comments on commit 35512d0

Please sign in to comment.