import { ReactNode, useEffect } from 'react'; import { AnimatePresence } from 'framer-motion'; import { useLocation } from 'react-router-dom'; import { Header } from './Header'; import { Sidebar } from './Sidebar'; import { MobileBottomNav } from './MobileBottomNav'; import { PageTransition } from './PageTransition'; import { useUIStore } from '@/stores/ui'; import { cn } from '@/lib/utils'; import { AstralBackground } from '../ui/AstralBackground'; import { NavigationProgress } from '../ui/NavigationProgress'; import { ScrollToTop } from '../ui/ScrollToTop'; interface LayoutProps { children: ReactNode; } export function Layout({ children }: LayoutProps) { const { sidebarOpen } = useUIStore(); const { pathname } = useLocation(); // Scroll to top on route change useEffect(() => { window.scrollTo(0, 0); }, [pathname]); return (