/* global React */ const { useState, useEffect, useMemo } = React; // ---------- Routing ---------- function useHashRoute() { const [hash, setHash] = useState(window.location.hash || '#/'); useEffect(() => { const onChange = () => { setHash(window.location.hash || '#/'); window.scrollTo({ top: 0, behavior: 'instant' in window ? 'instant' : 'auto' }); }; window.addEventListener('hashchange', onChange); return () => window.removeEventListener('hashchange', onChange); }, []); const path = hash.replace(/^#/, '') || '/'; return path; } function Link({ to, className, children, ...rest }) { return ( {children} ); } // ---------- Logo mark ---------- function LogoSquare({ size = 30 }) { return (
); } // ---------- Cap state chip ---------- function CapChip({ state }) { const label = state === 'capped' ? 'Capped' : state === 'waitlist' ? 'Waitlist' : 'Available'; return ( {label} ); } // ---------- Nav ---------- function Nav({ path, lang, setLang }) { const links = [ { to: '/concept', label: 'Concept' }, { to: '/collection', label: 'Collection' }, { to: '/the-project', label: 'The Project' }, { to: '/appointments', label: 'Appointments' }, { to: '/contact', label: 'Contact' }, ]; return (