remove useless methods

This commit is contained in:
igoradamenko
2018-05-18 23:58:10 +03:00
parent cbc74041c6
commit 109dccb9e4
+3 -15
View File
@@ -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 {
<Input
mix="root__input"
mods={{ type: 'main' }}
onSubmit={this.addComment}
onSubmit={store.addComment}
/>
)
}
@@ -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}
/>
))
}