From b7d436fe2fbc3580884fe7f323e97ddf086d9dbb Mon Sep 17 00:00:00 2001 From: Mehak Nasir <67791278+mehaknasir@users.noreply.github.com> Date: Sun, 7 Aug 2022 01:09:57 +0500 Subject: [PATCH] fix: add a response button added at the end of thread (#238) --- src/discussions/comments/CommentsView.jsx | 3 ++- .../comments/CommentsView.test.jsx | 10 +++++--- .../comments/comment/ResponseEditor.jsx | 23 ++++++++++++++----- 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/src/discussions/comments/CommentsView.jsx b/src/discussions/comments/CommentsView.jsx index b1418362..1a6c5c43 100644 --- a/src/discussions/comments/CommentsView.jsx +++ b/src/discussions/comments/CommentsView.jsx @@ -76,7 +76,8 @@ function DiscussionCommentsView({ {comments.map(comment => ( ))} - + {!!comments.length + && } {hasMorePages && !isLoading && ( @@ -31,6 +37,11 @@ function ResponseEditor({ ResponseEditor.propTypes = { postId: PropTypes.string.isRequired, intl: intlShape.isRequired, + addWrappingDiv: PropTypes.bool, +}; + +ResponseEditor.defaultProps = { + addWrappingDiv: false, }; export default injectIntl(ResponseEditor);