From b7cf630860d544d66af127c88d9390efa23602a5 Mon Sep 17 00:00:00 2001 From: Marc Farra Date: Fri, 29 Apr 2022 18:12:27 +0300 Subject: [PATCH] Fix conditional --- pages/organization.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pages/organization.js b/pages/organization.js index e9a58849..d45659ee 100644 --- a/pages/organization.js +++ b/pages/organization.js @@ -312,6 +312,7 @@ export default class Organization extends Component { let profileActions = [] if (this.state.modalIsOpen && isUserOwner) { + console.log('here') const profileId = parseInt(this.state.profileMeta.id) const isProfileManager = contains(profileId, managerIds) const isProfileOwner = contains(profileId, ownerIds) @@ -343,14 +344,13 @@ export default class Organization extends Component { } } - if (isProfileManager || isProfileOwner) { - profileActions.push({ - name: 'Assign a Badge', - onClick: () => Router.push( + profileActions.push({ + name: 'Assign a Badge', + onClick: () => + Router.push( join(URL, `/organizations/${org.id}/badges/assign/${profileId}`) ) - }) - } + }) } return (