remove useless methods
This commit is contained in:
@@ -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}
|
||||
/>
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user