diff --git a/client/coral-admin/src/components/ActionButton.js b/client/coral-admin/src/components/ActionButton.js index 61de1c669..09abdd266 100644 --- a/client/coral-admin/src/components/ActionButton.js +++ b/client/coral-admin/src/components/ActionButton.js @@ -4,43 +4,39 @@ import I18n from 'coral-framework/modules/i18n/i18n'; import translations from '../translations.json'; import {FabButton, Button, Icon} from 'coral-ui'; -const ActionButton = ({option, type, comment = {}, user, menuOptionsMap, onClickAction, onClickShowBanDialog}) => -{ - const banned = user.status === 'BANNED'; +const ActionButton = ({type, user}) => { + const menuOptionsMap = { + 'reject': {status: 'REJECTED', icon: 'close', key: 'r'}, + 'approve': {status: 'ACCEPTED', icon: 'done', key: 't'}, + 'flag': {status: 'FLAGGED', icon: 'flag', filter: 'Untouched'}, + 'ban': {status: 'BANNED', icon: 'not interested'} + }; - if (option === 'flag' && (type === 'USERS' || comment.status || comment.flagged === true)) { - return null; - } - if (option === 'ban') { + if (type === 'ban') { return (
@@ -62,11 +53,9 @@ const Comment = props => {
| - {lang.t('streams.article')} - | -- {lang.t('streams.pubdate')} - | -- {lang.t('streams.status')} - | -
|---|---|---|
| - {row.title} - | -- {row.publication_date} - | -- {lang.t('streams.status')} - | -