From 109dccb9e4f1456707ee64942b5293aad7c55645 Mon Sep 17 00:00:00 2001 From: igoradamenko Date: Fri, 18 May 2018 23:58:10 +0300 Subject: [PATCH] remove useless methods --- web/app/components/root/root.jsx | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/web/app/components/root/root.jsx b/web/app/components/root/root.jsx index d705aacb..6a2b2865 100644 --- a/web/app/components/root/root.jsx +++ b/web/app/components/root/root.jsx @@ -33,8 +33,6 @@ export default class Root extends Component { sort, }; - this.addComment = this.addComment.bind(this); - this.replaceComment = this.replaceComment.bind(this); this.onSignIn = this.onSignIn.bind(this); this.onSignOut = this.onSignOut.bind(this); this.onBlockedUsersShow = this.onBlockedUsersShow.bind(this); @@ -158,16 +156,6 @@ export default class Root extends Component { this.setState({ wasSomeoneUnblocked: true }); } - addComment(comment) { - store.addComment(comment); - this.setState({ comments: store.get('comments') }); - } - - replaceComment(comment) { - store.replaceComment(comment); - this.setState({ comments: store.get('comments') }); - } - render({}, { config = {}, comments = [], user, sort, isLoaded, isBlockedVisible, isCommentsListLoading, bannedUsers }) { if (!isLoaded) { return ( @@ -205,7 +193,7 @@ export default class Root extends Component { ) } @@ -235,8 +223,8 @@ export default class Root extends Component { mix="root__thread" mods={{ level: 0 }} data={thread} - onReply={this.addComment} - onEdit={this.replaceComment} + onReply={store.addComment} + onEdit={store.replaceComment} /> )) }