mirror of
https://github.com/wassname/talk.git
synced 2026-07-02 08:30:46 +08:00
Removing logic from ReplyBadge
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user