// Top navigation const Nav = ({ page, setPage }) => { const [scrolled, setScrolled] = React.useState(false); React.useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 12); window.addEventListener('scroll', onScroll); onScroll(); return () => window.removeEventListener('scroll', onScroll); }, []); const NAV = [ { id:'work', label:'Work' }, { id:'services', label:'Services' }, { id:'process', label:'Process' }, { id:'team', label:'Team' }, { id:'tools', label:'Tools' }, { id:'blog', label:'Journal' }, { id:'plan', label:'Roadmap' }, ]; const go = (id) => { if (['plan','case','services','process','work','blog','tools','pricing'].includes(id)) { setPage(id); window.scrollTo({top:0}); return; } setPage('home'); setTimeout(() => { const el = document.getElementById(id); if (el) el.scrollIntoView({behavior:'smooth', block:'start'}); }, 60); }; return ( ); }; window.Nav = Nav;