Skip to content

Commit 058158b

Browse files
committed
fix roles not showing
1 parent 443a6a4 commit 058158b

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/components/floating-profile/FloatingProfile.tsx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -523,20 +523,9 @@ const DesktopProfileFlyout = (props: {
523523
const ProfileArea = () => {
524524
const memberRoles = serverMembers.roles(member()!, true) || [];
525525

526-
const showRoles = () => {
527-
if (!server()) return false;
528-
if (memberRoles.length === 0) return false;
529-
const hasPerm = serverMembers.hasPermission(
530-
accountMember()!,
531-
ROLE_PERMISSIONS.MANAGE_ROLES
532-
);
533-
if (!hasPerm) return false;
534-
return true;
535-
};
536-
537526
return (
538527
<>
539-
<Show when={showRoles()}>
528+
<Show when={server()}>
540529
<div class={styles.section}>
541530
<FlyoutTitle
542531
primaryColor={colors()?.primary || undefined}

0 commit comments

Comments
 (0)