import { useState } from 'react'; import { Link, useLocation } from 'react-router-dom'; import { useAuth } from '../context/AuthContext'; import { Swords, Package, Hammer, User, LogOut, Shield, Scroll, Trophy, ShoppingBag, BookOpen } from 'lucide-react'; import { HudBar } from './HudBar'; import { GuideDrawer } from './GuideDrawer'; const NAV = [ { to: '/dashboard', icon: User, label: 'Personnage' }, { to: '/quests', icon: Scroll, label: 'Quêtes' }, { to: '/combat', icon: Swords, label: 'Combat' }, { to: '/inventory', icon: Package, label: 'Inventaire' }, { to: '/craft', icon: Hammer, label: 'Artisanat' }, { to: '/forge', icon: Shield, label: 'Forge' }, { to: '/shop', icon: ShoppingBag, label: 'Boutique' }, { to: '/achievements', icon: Trophy, label: 'Succès' }, ]; export function Layout({ children }: { children: React.ReactNode }) { const { user, logout } = useAuth(); const loc = useLocation(); const [guideOpen, setGuideOpen] = useState(false); return (
{/* Header */}
🐸 TetaRdPG
{user && (
{user.username}
)}
{/* Sidebar / Bottom nav */} {/* Main content */}
{children}
setGuideOpen(false)} />
); }