import { Outlet, NavLink, useLocation } from 'react-router-dom'; import { useEffect } from 'react'; import { LayoutDashboard, Layers, BarChart3, Settings, Cpu, HardDrive, Zap, Github, Menu, X, Sun, Moon } from 'lucide-react'; import { useSystemStore, useUIStore, useModelStore } from '../store'; import { motion, AnimatePresence } from 'framer-motion'; /** * Main application layout with sidebar navigation */ export default function Layout() { const { sidebarOpen, toggleSidebar, theme, toggleTheme } = useUIStore(); const systemInfo = useSystemStore((state) => state.systemInfo); const checkLoadedModel = useModelStore((state) => state.checkLoadedModel); const location = useLocation(); // Sync model state on mount useEffect(() => { checkLoadedModel(); }, []); const navItems = [ { path: '/dashboard', label: 'Dashboard', icon: LayoutDashboard }, { path: '/quantize', label: 'Quantizer', icon: Layers }, { path: '/analysis', label: 'Analysis', icon: BarChart3 }, { path: '/models', label: 'Models', icon: HardDrive }, ]; return (
{/* Sidebar */} {/* Mobile menu button */} {/* Main Content */}
); }