From da2b9aca03cefcef92dcd3e729feb5d38d1d675d Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Tue, 28 Nov 2017 14:56:29 -0300 Subject: [PATCH] Removing ternary --- .../coral-admin/src/routes/Community/containers/People.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/coral-admin/src/routes/Community/containers/People.js b/client/coral-admin/src/routes/Community/containers/People.js index 54bc92d02..3b769e60e 100644 --- a/client/coral-admin/src/routes/Community/containers/People.js +++ b/client/coral-admin/src/routes/Community/containers/People.js @@ -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(); }