From 0d95254fefb5314dd72188daf26aae8b319878d6 Mon Sep 17 00:00:00 2001 From: igoradamenko Date: Sat, 26 May 2018 19:47:22 +0300 Subject: [PATCH] hide replying and editing forms when comment is deleted --- web/app/components/comment/comment.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/app/components/comment/comment.jsx b/web/app/components/comment/comment.jsx index d616a8ee..85554b69 100644 --- a/web/app/components/comment/comment.jsx +++ b/web/app/components/comment/comment.jsx @@ -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));