hide replying and editing forms when comment is deleted

This commit is contained in:
igoradamenko
2018-05-26 19:47:22 +03:00
parent 4de3c3c50f
commit 0d95254fef
+5 -1
View File
@@ -179,7 +179,11 @@ export default class Comment extends Component {
const { id } = this.props.data;
if (confirm('Do you want to delete this comment?')) {
this.setState({ deleted: true });
this.setState({
deleted: true,
isEditing: false,
isReplying: false,
});
api.remove({ id }).then(() => {
api.getComment({ id }).then(comment => store.replaceComment(comment));