Skip to content

Commit cb7c0ac

Browse files
author
vikasrohit
authored
Merge pull request #586 from appirio-tech/feature/comments_remove_restriction_being_memeber
Github issue #572, Messaging: Owner response post missing from status update
2 parents cb4094e + 4114f3a commit cb7c0ac

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/components/Feed/Feed.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ const Feed = (props) => {
3636
<div className="card-body draftjs-post" dangerouslySetInnerHTML={{__html: html}} />
3737
</div>
3838
</Panel.Body>
39-
{allowComments &&
4039
<FeedComments
40+
allowComments={ allowComments }
4141
totalComments={totalComments}
4242
hasMoreComments={hasMoreComments}
4343
onLoadMoreComments={onLoadMoreComments}
@@ -49,7 +49,7 @@ const Feed = (props) => {
4949
avatarUrl={currentUser.photoURL}
5050
comments={comments}
5151
isAddingComment={ isAddingComment }
52-
/>}
52+
/>
5353
{children}
5454
</ActionCard>
5555
)

src/components/Feed/FeedComments.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class FeedComments extends React.Component {
2525
render() {
2626
const {
2727
comments, currentUser, totalComments, onLoadMoreComments, isLoadingComments, hasMoreComments, onAdd,
28-
onChange, content, avatarUrl, isAddingComment
28+
onChange, content, avatarUrl, isAddingComment, allowComments
2929
} = this.props
3030
let authorName = currentUser.firstName
3131
if (authorName && currentUser.lastName) {
@@ -77,6 +77,7 @@ class FeedComments extends React.Component {
7777
<div dangerouslySetInnerHTML={{__html: item.content}} />
7878
</Comment>
7979
)}
80+
{allowComments &&
8081
<AddComment
8182
placeholder="Create a new comment..."
8283
onAdd={onAdd}
@@ -85,7 +86,7 @@ class FeedComments extends React.Component {
8586
avatarUrl={avatarUrl}
8687
authorName={ authorName }
8788
isAdding={ isAddingComment }
88-
/>
89+
/>}
8990
</div>
9091
)
9192
}

0 commit comments

Comments
 (0)