Skip to content

Commit

Permalink
Fix conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
kamicut committed Apr 29, 2022
1 parent 04551c9 commit b7cf630
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pages/organization.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 (
Expand Down

0 comments on commit b7cf630

Please sign in to comment.