/** * ============================================================================= * LAYOUT COMPONENT - Application Shell * ============================================================================= * * Main layout wrapper with navigation and content area. * * INTERVIEW NOTES: * - Outlet from react-router renders nested route content * - Layout provides consistent navigation across pages * - Responsive design with mobile menu support */ import { Outlet, Link, useLocation } from 'react-router-dom'; import { useAppSelector, useAppDispatch } from '@/store'; import { selectResolvedTheme, setTheme } from '@/store/slices/uiSlice'; export default function Layout() { const location = useLocation(); const dispatch = useAppDispatch(); const theme = useAppSelector(selectResolvedTheme); const navItems = [ { path: '/', label: 'Home' }, { path: '/todos', label: 'Todos' }, { path: '/mistral', label: 'Mistral SDK' }, ]; const toggleTheme = () => { dispatch(setTheme(theme === 'dark' ? 'light' : 'dark')); }; return (
); }