Spaces:
Build error
Build error
Download frontend/components/admin/AdminLayout.tsx from Enternal1/primestake: direct link, hf CLI and curl.
- Browser
- Download file 2.95 kB
-
https://huggingface.co/spaces/Enternal1/primestake/resolve/main/frontend/components/admin/AdminLayout.tsx
- Command line
-
hf download hf://spaces/Enternal1/primestake/frontend/components/admin/AdminLayout.tsx
-
curl -L -o AdminLayout.tsx https://huggingface.co/spaces/Enternal1/primestake/resolve/main/frontend/components/admin/AdminLayout.tsx
2.95 kB
| "use client"; | |
| import Link from "next/link"; | |
| import { usePathname } from "next/navigation"; | |
| import type { ReactNode } from "react"; | |
| export function AdminLayout({ children }: { children: ReactNode }) { | |
| return ( | |
| <div className="flex min-h-screen bg-ps-bg text-ps-text-main"> | |
| <aside className="flex w-60 flex-col border-r border-ps-border bg-ps-surface px-4 py-4 text-xs"> | |
| <div className="mb-6 flex items-center gap-2 px-2"> | |
| <div className="flex h-8 w-8 items-center justify-center rounded bg-ps-primary text-sm font-semibold text-white"> | |
| PS | |
| </div> | |
| <div> | |
| <div className="text-sm font-semibold">Prime stake</div> | |
| <div className="text-[11px] text-ps-text-muted">Admin</div> | |
| </div> | |
| </div> | |
| <div className="mb-3 text-[11px] font-semibold uppercase tracking-wide text-ps-text-muted"> | |
| Sports Management | |
| </div> | |
| <nav className="space-y-1"> | |
| <AdminNavItem href="/admin">Dashboard</AdminNavItem> | |
| <AdminNavItem href="/admin/matches">Matches</AdminNavItem> | |
| <AdminNavItem href="/admin/casino">Casino</AdminNavItem> | |
| <AdminNavItem href="/admin/markets">Markets</AdminNavItem> | |
| <AdminNavItem href="/admin/bets">Bets</AdminNavItem> | |
| </nav> | |
| <div className="mt-6 mb-3 text-[11px] font-semibold uppercase tracking-wide text-ps-text-muted"> | |
| Administration | |
| </div> | |
| <nav className="space-y-1"> | |
| <AdminNavItem href="/admin/users">Users</AdminNavItem> | |
| <AdminNavItem href="/admin/deposits">Deposits</AdminNavItem> | |
| <AdminNavItem href="/admin/withdrawals">Withdrawals</AdminNavItem> | |
| <AdminNavItem href="/admin/cms">CMS / Banners</AdminNavItem> | |
| <AdminNavItem href="/admin/settings">Settings</AdminNavItem> | |
| </nav> | |
| <div className="mt-auto flex items-center gap-3 rounded-lg bg-ps-surface-alt border border-ps-border px-3 py-3 text-[11px]"> | |
| <div className="flex h-9 w-9 items-center justify-center rounded-full bg-ps-primary text-xs text-white font-bold"> | |
| A | |
| </div> | |
| <div> | |
| <div className="font-semibold">Alex Admin</div> | |
| <div className="text-ps-primary font-semibold">Super Admin</div> | |
| </div> | |
| </div> | |
| </aside> | |
| <main className="flex-1 px-6 py-5"> | |
| {children} | |
| </main> | |
| </div> | |
| ); | |
| } | |
| function AdminNavItem({ | |
| href, | |
| children | |
| }: { | |
| href: string; | |
| children: ReactNode; | |
| }) { | |
| const pathname = usePathname(); | |
| const isActive = pathname === href; | |
| return ( | |
| <Link | |
| href={href} | |
| className={`flex items-center justify-between rounded-md px-3 py-2 font-medium transition-colors ${ | |
| isActive | |
| ? "bg-ps-primary text-white shadow-sm" | |
| : "text-ps-text-main hover:bg-ps-surface-alt" | |
| }`} | |
| > | |
| <span>{children}</span> | |
| </Link> | |
| ); | |
| } | |