Skip to content

Commit

Permalink
feat(navbar): add review pack section (#122)
Browse files Browse the repository at this point in the history
Co-authored-by: mezotv <[email protected]>
  • Loading branch information
mezotv and mezotv authored Feb 28, 2025
1 parent 556a0dd commit 15affa7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
20 changes: 19 additions & 1 deletion components/UserDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ import {
DropdownMenuSeparator,
DropdownMenuTrigger
} from '@/components/ui/user-dropdown-menu'
import {
LayoutDashboardIcon,
LogOut,
ShieldEllipsis,
UserRound
} from 'lucide-react'
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'
import { LayoutDashboardIcon, LogOut, UserRound } from 'lucide-react'
import type { IdTokenJWT } from '@/helpers/oauth/types'
import ALLOWED_ADMIN_IDS from '@/data/reviewers.json'
import { usePathname } from 'next/navigation'
import Image from 'next/image'
import Link from 'next/link'
Expand Down Expand Up @@ -57,6 +63,18 @@ export default function UserDropdown({
<span>View Profile</span>
</DropdownMenuItem>
</Link>
{user?.id && ALLOWED_ADMIN_IDS.includes(user?.id) && (
<Link
key="Review Packs"
href="/packs/review"
onClick={handleIsOpen}
>
<DropdownMenuItem className="flex gap-2">
<ShieldEllipsis className="mt-0.5 h-4 w-4" />
<span>Review Packs</span>
</DropdownMenuItem>
</Link>
)}
<Link
key="Manage Subscription"
href="/manage/subscription"
Expand Down
2 changes: 1 addition & 1 deletion next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const nextConfig: NextConfig = {
return [
{
source: '/manage/subscription',
destination: '/api/subs/manage',
destination: '/api/subs/manage'
}
]
},
Expand Down

0 comments on commit 15affa7

Please sign in to comment.