diff --git a/client/coral-admin/src/components/UserDetail.js b/client/coral-admin/src/components/UserDetail.js index 450b2cecc..7a7d7a672 100644 --- a/client/coral-admin/src/components/UserDetail.js +++ b/client/coral-admin/src/components/UserDetail.js @@ -8,13 +8,12 @@ import { Slot } from 'coral-framework/components'; import UserDetailCommentList from '../components/UserDetailCommentList'; import { - getReliability, isSuspended, - isBanned, isUsernameRejected, isUsernameChanged, getActiveStatuses, - isSuspended, isBanned, getKarma + isBanned, + getKarma, } from 'coral-framework/utils/user'; import ButtonCopyToClipboard from './ButtonCopyToClipboard'; @@ -113,6 +112,13 @@ class UserDetail extends React.Component { router.push('/admin/community/flagged'); }; + rejectUsername = data => { + // trigger modal or tooltip + // flag user and then + // perform rejection + this.props.rejectUsername(data); + }; + renderLoaded() { const { root, @@ -133,7 +139,6 @@ class UserDetail extends React.Component { unbanUser, unsuspendUser, modal, - rejectUsername, acceptComment, rejectComment, bulkAccept, @@ -225,7 +230,7 @@ class UserDetail extends React.Component { ) : ( rejectUsername({ id: user.id })} + onClick={() => this.rejectUsername({ id: user.id })} disabled={me.id === user.id} > {t('user_detail.reject_username')}