mirror of
https://github.com/wassname/talk.git
synced 2026-10-03 13:02:47 +08:00
Removing ternary
This commit is contained in:
1 parent
20d0cbaf27
commit
da2b9aca03
1 file changed
+7
-1
@@ -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