summaryrefslogtreecommitdiffstats
path: root/webapp/components/common/comment_icon.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/common/comment_icon.jsx')
-rw-r--r--webapp/components/common/comment_icon.jsx16
1 files changed, 9 insertions, 7 deletions
diff --git a/webapp/components/common/comment_icon.jsx b/webapp/components/common/comment_icon.jsx
index 4505d51bc..e3781a4be 100644
--- a/webapp/components/common/comment_icon.jsx
+++ b/webapp/components/common/comment_icon.jsx
@@ -21,16 +21,18 @@ export default function CommentIcon(props) {
iconStyle = iconStyle + ' ' + props.searchStyle;
}
- let commentIconId = props.channelId + props.idPrefix;
+ let selectorId = props.idPrefix;
if (props.idCount > -1) {
- commentIconId += props.idCount;
+ selectorId += props.idCount;
}
+ const id = Utils.createSafeId(props.idPrefix + '_' + props.id);
+
return (
<a
- id={Utils.createSafeId(commentIconId)}
+ id={id}
href='#'
- className={iconStyle}
+ className={iconStyle + ' ' + selectorId}
onClick={props.handleCommentClick}
>
<span
@@ -48,12 +50,12 @@ CommentIcon.propTypes = {
handleCommentClick: PropTypes.func.isRequired,
searchStyle: PropTypes.string,
commentCount: PropTypes.number,
- channelId: PropTypes.string
+ id: PropTypes.string
};
CommentIcon.defaultProps = {
idCount: -1,
searchStyle: '',
commentCount: 0,
- channelId: ''
-}; \ No newline at end of file
+ id: ''
+};