Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add events team link to nav
  • Loading branch information
regalijan committed Feb 25, 2024
1 parent f2b546b commit 6d9f1cd
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions components/Navigation.tsx
Expand Up @@ -67,6 +67,14 @@ export default function (props: {
);
}

function isET(): boolean {
const { permissions } = props;

if (typeof permissions === "undefined") return false;

return Boolean([1 << 3, 1 << 4, 1 << 12].find((int) => permissions & int));
}

return (
<>
<Box as="section" pb={{ base: "6" }}>
Expand Down Expand Up @@ -109,6 +117,13 @@ export default function (props: {
<Link href="https://ccdiscussion.com" size="lg">
Community
</Link>
<Link
display={isET() ? undefined : "none"}
href="/events-team"
size="lg"
>
Events Team
</Link>
<Link
display={hasMod() ? undefined : "none"}
href="/mod-queue"
Expand Down Expand Up @@ -184,6 +199,9 @@ export default function (props: {
<Link href="/team">Our Team</Link>
<Link href="/support">Support</Link>
<Link href="https://ccdiscussion.com">Community</Link>
<Link href="/events-team" display={isET() ? undefined : "none"}>
Events Team
</Link>
<Link href="/mod-queue" display={hasMod() ? undefined : "none"}>
Moderation
</Link>
Expand Down

0 comments on commit 6d9f1cd

Please sign in to comment.