import { Link, usePage } from '@inertiajs/react'; import { PropsWithChildren, ReactNode, useState } from 'react'; import { LayoutDashboard, BookOpen, Layers, Trophy, User, Settings, LogOut, Menu, Search, Bell, Plus, Play } from 'lucide-react'; import { Sheet, SheetContent, SheetTrigger } from '@/Components/ui/sheet'; import { Button } from '@/Components/ui/button'; import { Avatar, AvatarFallback, AvatarImage } from '@/Components/ui/avatar'; import { cn } from '@/lib/utils'; import { ScrollArea } from '@/Components/ui/scroll-area'; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from '@/Components/ui/dropdown-menu'; import { ModeToggle } from '@/Components/ModeToggle'; export default function DashboardLayout({ header, children, }: PropsWithChildren<{ header?: ReactNode }>) { const user = usePage().props.auth.user; const { url } = usePage(); const navItems = [ { label: 'Dashboard', icon: LayoutDashboard, href: route('dashboard'), active: route().current('dashboard') }, { label: 'Study (SRS)', icon: BookOpen, href: route('srs.index'), active: route().current('srs.*') }, { label: 'Decks', icon: Layers, href: route('courses.index'), active: route().current('courses.index') }, { label: 'Leaderboard', icon: Trophy, href: '#', active: false }, { label: 'Profile', icon: User, href: route('profile.edit'), active: route().current('profile.edit') }, ]; const SidebarContent = () => (
{/* Logo */}
N

NIHONBUZZ

Academy

{/* Nav Links */} {/* Profile Section (Bottom) */}
{user.name.charAt(0)}

{user.name}

Level 12 Scholar

{/* Mini Progress Bar */}
XP Progress 85%
Settings
); return (
{/* Desktop Sidebar */} {/* Mobile Header / Sheet */}
NIHONBUZZ
{user.name.charAt(0)}
{/* Main Content */}
{/* Desktop Topbar */}
Dashboard / Home
{children}
); }