From fafeadf8ae1d63204e62347cd47115ed9cfbd219 Mon Sep 17 00:00:00 2001
From: Joram Wilander <jwawilander@gmail.com>
Date: Thu, 22 Jun 2017 09:50:43 -0400
Subject: Show comment count when deleting from RHS (#6711)

---
 webapp/components/rhs_root_post.jsx | 35 +++++++++++++++++++----------------
 1 file changed, 19 insertions(+), 16 deletions(-)

(limited to 'webapp/components/rhs_root_post.jsx')

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
-};
-- 
cgit v1.2.3-1-g7c22

