Removing logic from ReplyBadge

This commit is contained in:
Belen Curcio
2017-08-22 09:40:49 -03:00
parent c402627280
commit cb4d2998f6
3 changed files with 4 additions and 4 deletions
@@ -2,10 +2,10 @@ import React from 'react';
import {Badge} from 'coral-ui';
import t from 'coral-framework/services/i18n';
const ReplyBadge = ({hasParent}) => hasParent ?
const ReplyBadge = () => (
<Badge icon="reply">
{t('modqueue.reply')}
</Badge>
: null;
);
export default ReplyBadge;
@@ -59,7 +59,7 @@ class UserDetailComment extends React.Component {
}
<div className={styles.badgeBar}>
<ReplyBadge hasParent={comment.hasParent} />
{comment.hasParent && <ReplyBadge/>}
<CommentType type={commentType}/>
</div>
</div>
@@ -108,7 +108,7 @@ class Comment extends React.Component {
</ActionsMenu>
}
<div className={styles.adminCommentInfoBar}>
<ReplyBadge hasParent={comment.hasParent} />
{comment.hasParent && <ReplyBadge/>}
<CommentType type={commentType} className={styles.commentType}/>
<Slot
fill="adminCommentInfoBar"