summaryrefslogtreecommitdiffstats
path: root/webapp/components/post_view
diff options
context:
space:
mode:
authorSaturnino Abril <saturnino.abril@gmail.com>2017-05-11 21:12:33 +0900
committerJoram Wilander <jwawilander@gmail.com>2017-05-11 08:12:33 -0400
commit81b2fd99825b1f92f7aad3591b95425656497a16 (patch)
treeec1a3c861dae13ff4c1ecd962a5d6bc72060d65f /webapp/components/post_view
parent4f589e077c82da00dd505319ddcf3565c699d4e6 (diff)
downloadchat-81b2fd99825b1f92f7aad3591b95425656497a16.tar.gz
chat-81b2fd99825b1f92f7aad3591b95425656497a16.tar.bz2
chat-81b2fd99825b1f92f7aad3591b95425656497a16.zip
add IDs for reply arrows at center and RHS (#6311)
Diffstat (limited to 'webapp/components/post_view')
-rw-r--r--webapp/components/post_view/components/post_info.jsx30
1 files changed, 7 insertions, 23 deletions
diff --git a/webapp/components/post_view/components/post_info.jsx b/webapp/components/post_view/components/post_info.jsx
index 1496429b3..3833f5058 100644
--- a/webapp/components/post_view/components/post_info.jsx
+++ b/webapp/components/post_view/components/post_info.jsx
@@ -9,6 +9,7 @@ import PostFlagIcon from 'components/common/post_flag_icon.jsx';
import * as GlobalActions from 'actions/global_actions.jsx';
import * as PostActions from 'actions/post_actions.jsx';
+import CommentIcon from 'components/common/comment_icon.jsx';
import * as Utils from 'utils/utils.jsx';
import * as PostUtils from 'utils/post_utils.jsx';
@@ -342,30 +343,13 @@ export default class PostInfo extends React.Component {
let comments = null;
let react = null;
if (!isEphemeral && !isPending && !isSystemMessage) {
- let showCommentClass;
- let commentCountText;
- if (this.props.commentCount >= 1) {
- showCommentClass = ' icon--show';
- commentCountText = this.props.commentCount;
- } else {
- showCommentClass = '';
- commentCountText = '';
- }
-
comments = (
- <a
- href='#'
- className={'comment-icon__container' + showCommentClass}
- onClick={this.props.handleCommentClick}
- >
- <span
- className='comment-icon'
- dangerouslySetInnerHTML={{__html: Constants.REPLY_ICON}}
- />
- <span className='comment-count'>
- {commentCountText}
- </span>
- </a>
+ <CommentIcon
+ idPrefix={'commentIcon'}
+ idCount={idCount}
+ handleCommentClick={this.props.handleCommentClick}
+ commentCount={this.props.commentCount}
+ />
);
if (Utils.isFeatureEnabled(Constants.PRE_RELEASE_FEATURES.EMOJI_PICKER_PREVIEW)) {