diff --git a/client/coral-admin/src/routes/Moderation/components/UserDetail.js b/client/coral-admin/src/routes/Moderation/components/UserDetail.js index 76bc100fc..0fb355486 100644 --- a/client/coral-admin/src/routes/Moderation/components/UserDetail.js +++ b/client/coral-admin/src/routes/Moderation/components/UserDetail.js @@ -18,7 +18,8 @@ export default class UserDetail extends React.Component { rejectComment: PropTypes.func.isRequired, changeStatus: PropTypes.func.isRequired, toggleSelect: PropTypes.func.isRequired, - bulkSetCommentStatus: PropTypes.func.isRequired, + bulkAccept: PropTypes.func.isRequired, + bulkReject: PropTypes.func.isRequired, } copyPermalink = () => { @@ -31,14 +32,6 @@ export default class UserDetail extends React.Component { } } - changeStatus = (tab) => { - if (tab === 'all') { - this.props.changeStatus('all'); - } else if (tab === 'rejected') { - this.props.changeStatus('rejected'); - } - } - rejectThenReload = (info) => { this.props.rejectComment(info).then(() => { this.props.data.refetch(); @@ -51,6 +44,14 @@ export default class UserDetail extends React.Component { }); } + showAll = () => { + this.props.changeStatus('all'); + } + + showRejected = () => { + this.props.changeStatus('rejected'); + } + render () { const { root: { @@ -66,7 +67,8 @@ export default class UserDetail extends React.Component { bannedWords, suspectWords, toggleSelect, - bulkSetCommentStatus, + bulkAccept, + bulkReject, showBanUserDialog, showSuspendUserDialog, hideUserDetail @@ -116,20 +118,20 @@ export default class UserDetail extends React.Component { selectedIds.length === 0 ? ( ) : (