diff --git a/client/coral-admin/src/routes/Community/components/FlaggedUser.js b/client/coral-admin/src/routes/Community/components/FlaggedUser.js index 3526bcc37..f77b95b90 100644 --- a/client/coral-admin/src/routes/Community/components/FlaggedUser.js +++ b/client/coral-admin/src/routes/Community/components/FlaggedUser.js @@ -17,99 +17,115 @@ const shortReasons = { }; // Render a single user for the list -const User = (props) => { - const {user, modActionButtons} = props; +class User extends React.Component { - const showSuspenUserDialog = () => props.showSuspendUserDialog({ - userId: user.id, - username: user.username, + showSuspenUserDialog = () => this.props.showSuspendUserDialog({ + userId: this.props.user.id, + username: this.props.user.username, }); - const showBanUserDialog = () => props.showBanUserDialog({ - userId: user.id, - username: user.username, + showBanUserDialog = () => this.props.showBanUserDialog({ + userId: this.props.user.id, + username: this.props.user.username, }); - return ( -
- {action.user && - - } - : {action.message ? action.message : 'n/a'} -
; + // find the action by action_sum.reason + (action, j) => { + if (action.reason === action_sum.reason) { + return+ {action.user && + + } + : {action.message ? action.message : 'n/a'} +
; + } + return null; } - return null; - } - )} -