Files
deckyvault/lib/routes.ts
T
adrianbonpin 012ad64a0d feat: add admin layout with sidebar, auth guard, and navbar link
- Admin layout with server-side auth guard (redirects non-admins)
- Reusable sidebar component with active state detection
- Navbar profile dropdown shows admin link for admin users
- Admin routes are noindexed (robots: false)
- /admin redirects to /admin/users
2026-04-27 21:02:28 +08:00

60 lines
1.1 KiB
TypeScript

export const routes = [
{
title: "Home",
href: "/",
},
{
title: "Search",
href: "/search",
},
// TODO: Add back when games page is implemented
// {
// title: "Games",
// href: "/games",
// },
// TODO: Add back when compare page is implemented
// {
// title: "Compare",
// href: "/compare",
// },
{
title: "Devices",
href: "/devices",
},
// TODO: Add back when about page is implemented
// {
// title: "About",
// href: "/about",
// }
]
export const authRoutes = [
{
title: "Profile",
href: "/profile",
icon: "User",
},
{
title: "Saved Games",
href: "/profile?tab=saved",
icon: "Bookmark",
},
]
export const adminRoutes = [
{
title: "Users",
href: "/admin/users",
icon: "Users",
},
{
title: "Hardware",
href: "/admin/hardware",
icon: "Cpu",
},
{
title: "Games",
href: "/admin/games",
icon: "Gamepad2",
},
]