mirror of
https://github.com/wassname/talk.git
synced 2026-07-15 11:26:58 +08:00
No approve button for Approved comments
This commit is contained in:
@@ -7,17 +7,15 @@ import cn from 'classnames';
|
||||
const isApproved = (status) => (status === 'ACCEPTED');
|
||||
|
||||
export default ({approveComment, comment: {status}}) => (
|
||||
<button className={cn(styles.button, 'talk-plugin-moderation-actions-reject')} onClick={approveComment}>
|
||||
{isApproved(status) ? (
|
||||
<span className={styles.approved}>
|
||||
<Icon name="check_circle" className={styles.icon} />
|
||||
{t('talk-plugin-moderation-actions.approved_comment')}
|
||||
</span>
|
||||
) : (
|
||||
<span>
|
||||
<Icon name="done" className={styles.icon} />
|
||||
{t('talk-plugin-moderation-actions.approve_comment')}
|
||||
</span>
|
||||
)}
|
||||
</button>
|
||||
isApproved(status) ? (
|
||||
<span className={styles.approved}>
|
||||
<Icon name="check_circle" className={styles.icon} />
|
||||
{t('talk-plugin-moderation-actions.approved_comment')}
|
||||
</span>
|
||||
) : (
|
||||
<button className={cn(styles.button, 'talk-plugin-moderation-actions-reject')} onClick={approveComment}>
|
||||
<Icon name="done" className={styles.icon} />
|
||||
{t('talk-plugin-moderation-actions.approve_comment')}
|
||||
</button>
|
||||
)
|
||||
);
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
}
|
||||
|
||||
.approved {
|
||||
display: inline-block;
|
||||
color: #519954;
|
||||
font-weight: bold;
|
||||
padding: 6px;
|
||||
}
|
||||
Reference in New Issue
Block a user