diff --git a/client/coral-admin/src/components/CommentList.js b/client/coral-admin/src/components/CommentList.js index b5eb40231..178d3cc02 100644 --- a/client/coral-admin/src/components/CommentList.js +++ b/client/coral-admin/src/components/CommentList.js @@ -6,10 +6,10 @@ import Comment from 'components/Comment'; // Each action has different meaning and configuration const modActions = { - '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'} + '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'} }; // Renders a comment list and allow performing actions @@ -21,7 +21,7 @@ export default class CommentList extends React.Component { comments: PropTypes.object.isRequired, users: PropTypes.object.isRequired, onClickAction: PropTypes.func, - + // list of actions (flags, etc) associated with the comments modActions: PropTypes.arrayOf(PropTypes.string).isRequired, loading: PropTypes.bool, diff --git a/client/coral-plugin-commentbox/CommentBox.js b/client/coral-plugin-commentbox/CommentBox.js index 54fee8319..3028103a7 100644 --- a/client/coral-plugin-commentbox/CommentBox.js +++ b/client/coral-plugin-commentbox/CommentBox.js @@ -69,7 +69,7 @@ class CommentBox extends Component { const postedComment = data.createComment; // const commentId = postedComment.id; - if (postedComment.status === 'rejected') { + if (postedComment.status === 'REJECTED') { addNotification('error', lang.t('comment-post-banned-word')); } else if (postedComment.status === 'PREMOD') { addNotification('success', lang.t('comment-post-notif-premod'));