Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt committed Jan 7, 2024
1 parent 294cf22 commit acbad62
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/components/community-menu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -585,20 +585,20 @@ export default function CommunityMenu() {
const community = data?.community;
const channelGroups = community?.channel_groups;

if (!community) {
return null;
}

let serverOwner = false;
let manageCommunity = false;
let manageChannels = false;
let canInvite = false;

if (!!me) {
serverOwner = community?.server_owner ?? false;
manageCommunity = community?.permissions?.manage_community ?? false;
manageChannels = community?.permissions?.manage_channels ?? false;
canInvite = community?.permissions?.create_invite ?? false;
}

if (!community) {
return null;
serverOwner = community.server_owner ?? false;
manageCommunity = community.permissions?.manage_community ?? false;
manageChannels = community.permissions?.manage_channels ?? false;
canInvite = community.permissions?.create_invite ?? false;
}

return (
Expand Down

0 comments on commit acbad62

Please sign in to comment.