diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-06-22 09:50:43 -0400 |
---|---|---|
committer | Saturnino Abril <saturnino.abril@gmail.com> | 2017-06-22 21:50:43 +0800 |
commit | fafeadf8ae1d63204e62347cd47115ed9cfbd219 (patch) | |
tree | d985c82a5e4a9bfa90eba6c95adbfb2ab2d5cb37 /webapp | |
parent | 3f1fca9463df27e8f795356ab6873d0d5bf4d634 (diff) | |
download | chat-fafeadf8ae1d63204e62347cd47115ed9cfbd219.tar.gz chat-fafeadf8ae1d63204e62347cd47115ed9cfbd219.tar.bz2 chat-fafeadf8ae1d63204e62347cd47115ed9cfbd219.zip |
Show comment count when deleting from RHS (#6711)
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/components/rhs_root_post.jsx | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/webapp/components/rhs_root_post.jsx b/webapp/components/rhs_root_post.jsx index 8f464056b..83f50b6ea 100644 --- a/webapp/components/rhs_root_post.jsx +++ b/webapp/components/rhs_root_post.jsx @@ -28,6 +28,24 @@ import {Link} from 'react-router/es6'; import {FormattedMessage} from 'react-intl'; export default class RhsRootPost extends React.Component { + static propTypes = { + post: PropTypes.object.isRequired, + user: PropTypes.object.isRequired, + currentUser: PropTypes.object.isRequired, + compactDisplay: PropTypes.bool, + useMilitaryTime: PropTypes.bool.isRequired, + commentCount: PropTypes.number.isRequired, + isFlagged: PropTypes.bool, + status: PropTypes.string, + previewCollapsed: PropTypes.string, + isBusy: PropTypes.bool, + getPostList: PropTypes.func.isRequired + } + + static defaultProps = { + commentCount: 0 + } + constructor(props) { super(props); @@ -362,6 +380,7 @@ export default class RhsRootPost extends React.Component { post={this.props.post} isFlagged={this.props.isFlagged} handleDropdownOpened={this.handleDropdownOpened} + commentCount={this.props.commentCount} /> ); @@ -411,19 +430,3 @@ export default class RhsRootPost extends React.Component { ); } } - -RhsRootPost.defaultProps = { - commentCount: 0 -}; -RhsRootPost.propTypes = { - post: PropTypes.object.isRequired, - user: PropTypes.object.isRequired, - currentUser: PropTypes.object.isRequired, - compactDisplay: PropTypes.bool, - useMilitaryTime: PropTypes.bool.isRequired, - isFlagged: PropTypes.bool, - status: PropTypes.string, - previewCollapsed: PropTypes.string, - isBusy: PropTypes.bool, - getPostList: PropTypes.func.isRequired -}; |