Swapped reply form order and removed form after submitting
This commit is contained in:
parent
6a179b06c4
commit
5d5e63ba92
@ -52,16 +52,16 @@ const Comment = (props) => {
|
||||
<More comment={comment} toggleEdit={toggleEditMode} />
|
||||
</div>
|
||||
</div>
|
||||
{isInReplyMode &&
|
||||
<div className={`ml-14 mt-8`}>
|
||||
<ReplyForm parent={comment} />
|
||||
</div>
|
||||
}
|
||||
{hasReplies &&
|
||||
<div className={`ml-14 ${isInReplyMode ? 'mt-8' : 'mt-14'}`}>
|
||||
<Replies replies={comment.replies} />
|
||||
</div>
|
||||
}
|
||||
{isInReplyMode &&
|
||||
<div className={`ml-14 mt-8`}>
|
||||
<ReplyForm parent={comment} toggle={toggleReplyMode} />
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ const ReplyForm = (props) => {
|
||||
// Clear message on success
|
||||
setMessage('');
|
||||
setFocused(false);
|
||||
props.toggle();
|
||||
} catch (e) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(e);
|
||||
|
Loading…
Reference in New Issue
Block a user