Uppercase more enums in coral-admin

This commit is contained in:
David Erwin
2017-01-24 17:17:03 -05:00
parent d2acffc19c
commit 9435b627b1
2 changed files with 6 additions and 6 deletions
@@ -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,
+1 -1
View File
@@ -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'));