Skip to content

Commit

Permalink
Update Navbar.tsx
Browse files Browse the repository at this point in the history
Update logic for isAdmin field
  • Loading branch information
lsyurea committed Oct 19, 2024
1 parent 81da6ef commit 2fd8e22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions peerprep-fe/src/components/navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function Navbar() {
PeerPrep
</Link>
<div className="flex items-center space-x-4">
{user?.isAdmin && (
{user!.isAdmin && (
<Link href="/admin" className="text-gray-300 hover:text-white">
Admin
</Link>
Expand All @@ -39,7 +39,7 @@ export default function Navbar() {
Questions
</Link>
{/* Admin users should be able to add questions instead of match */}
{user?.isAdmin ?
{!user!.isAdmin ?
<Link href="/match" className="text-gray-300 hover:text-white">
Match
</Link> :
Expand Down

0 comments on commit 2fd8e22

Please sign in to comment.