From d7e554a0551ad75c79b647d173dc4d45223df1a3 Mon Sep 17 00:00:00 2001 From: riley Date: Mon, 20 Mar 2017 13:01:38 -0600 Subject: [PATCH] hide reply button if stream is closed --- client/coral-embed-stream/src/Comment.js | 19 ++++++++++++------- client/coral-embed-stream/src/Embed.js | 1 + client/coral-embed-stream/src/Stream.js | 7 +++++-- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/client/coral-embed-stream/src/Comment.js b/client/coral-embed-stream/src/Comment.js index 06352ec2f..4556f23c6 100644 --- a/client/coral-embed-stream/src/Comment.js +++ b/client/coral-embed-stream/src/Comment.js @@ -43,6 +43,7 @@ class Comment extends React.Component { // id of currently opened ReplyBox. tracked in Stream.js activeReplyBox: PropTypes.string.isRequired, + disableReply: PropTypes.bool, setActiveReplyBox: PropTypes.func.isRequired, showSignInDialog: PropTypes.func.isRequired, postFlag: PropTypes.func.isRequired, @@ -109,6 +110,7 @@ class Comment extends React.Component { deleteAction, addCommentTag, removeCommentTag, + disableReply, } = this.props; const like = getActionSummary('LikeActionSummary', comment); @@ -166,13 +168,16 @@ class Comment extends React.Component { showSignInDialog={showSignInDialog} currentUser={currentUser} /> - - setActiveReplyBox(comment.id)} - parentCommentId={parentId || comment.id} - currentUserId={currentUser && currentUser.id} - banned={false} /> - + { + !disableReply && + + setActiveReplyBox(comment.id)} + parentCommentId={parentId || comment.id} + currentUserId={currentUser && currentUser.id} + banned={false} /> + + }