Skip to content

Commit

Permalink
fix admin link check
Browse files Browse the repository at this point in the history
  • Loading branch information
christianhelp committed Oct 24, 2024
1 parent 638fd57 commit 11c5602
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions apps/web/src/components/shared/ProfileButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ export default async function ProfileButton() {
</DropdownMenu>
);
}

// Returns only if there is a full user
return (
<DropdownMenu>
Expand Down Expand Up @@ -153,14 +152,13 @@ export default async function ProfileButton() {
Event Pass
</DropdownMenuItem>
</Link>
{user.role === "admin" ||
(user.role === "super_admin" && (
{['admin','super_admin','volunteer'].includes(user.role) && (
<Link href={`/admin`}>
<DropdownMenuItem className="cursor-pointer text-hackathon">
Admin
</DropdownMenuItem>
</Link>
))}
)}
<MobileNavBarLinks />
<DropdownMenuSeparator className="bg-[rgb(228,228,231)] dark:bg-[rgb(39,39,42)]" />
<Link href={`/bug-report`}>
Expand Down

0 comments on commit 11c5602

Please sign in to comment.