'use client'; import { ArrowUp, Home, Info, Mail } from 'lucide-react'; import React, { useEffect, useState } from 'react'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; const Layout = ({ children }: { children: React.ReactNode }) => { const pathname = usePathname(); const [showScrollTop, setShowScrollTop] = useState(false); useEffect(() => { const handleScroll = () => { setShowScrollTop(window.scrollY > 400); }; const throttledScroll = () => { window.requestAnimationFrame(handleScroll); }; window.addEventListener('scroll', throttledScroll, { passive: true }); return () => window.removeEventListener('scroll', throttledScroll); }, []); useEffect(() => { window.scrollTo(0, 0); }, [pathname]); const scrollToTop = () => { window.scrollTo({ top: 0, behavior: 'smooth' }); }; const isActive = (path: string) => pathname === path; return (
MB Grid Solutions
{children}
); }; export default Layout;