// Sticky translucent top nav — with mobile hamburger menu const Nav = ({route, setRoute, onSignup, onCart, cartCount=0, onSignin, isResellerAuthed}) => { const [open, setOpen] = React.useState(false); const [mobile, setMobile] = React.useState(() => window.innerWidth < 900); React.useEffect(() => { const onResize = () => setMobile(window.innerWidth < 900); window.addEventListener("resize", onResize); return () => window.removeEventListener("resize", onResize); }, []); // Close menu when route changes React.useEffect(() => { setOpen(false); }, [route]); const links = [ {id:"services", label:"Services"}, {id:"shop", label:"Shop"}, {id:"gallery", label:"Gallery"}, {id:"wholesale", label:"Wholesale"}, {id:"blog", label:"Blog"}, {id:"about", label:"About"}, {id:"contact", label:"Contact"}, ]; const go = (id) => { setRoute(id); setOpen(false); window.scrollTo({top:0, behavior:"instant"}); }; const linkStyle = (id) => ({ cursor:"pointer", fontFamily:"var(--font-mono)", fontSize:11, letterSpacing:".22em", textTransform:"uppercase", color: route===id ? "var(--color-cyan)" : "var(--color-fg)", textShadow: route===id ? "0 0 8px rgba(120,214,241,.6)" : "none", }); return ( ); }; window.Nav = Nav;