mirror of
https://github.com/wassname/talk.git
synced 2026-07-03 07:28:29 +08:00
Removing ternary
This commit is contained in:
@@ -64,7 +64,13 @@ class PeopleContainer extends React.Component {
|
||||
|
||||
setUserBanStatus = async (id, bannedStatus) => {
|
||||
const {banUser, unBanUser} = this.props;
|
||||
await bannedStatus ? banUser({id, message: ''}) : unBanUser({id});
|
||||
|
||||
if (bannedStatus) {
|
||||
await banUser({id, message: ''});
|
||||
} else {
|
||||
await unBanUser({id});
|
||||
}
|
||||
|
||||
await this.fetchUsers();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user