// nav.jsx — Top nav + side index. function Nav({ accent, onAccentClick }) { const [scrolled, setScrolled] = React.useState(false); const [time, setTime] = React.useState(""); const [workOpen, setWorkOpen] = React.useState(false); const [menuOpen, setMenuOpen] = React.useState(false); const openTimer = React.useRef(null); const closeTimer = React.useRef(null); const armOpen = () => { clearTimeout(closeTimer.current); clearTimeout(openTimer.current); openTimer.current = setTimeout(() => setWorkOpen(true), 500); }; const keepOpen = () => { clearTimeout(closeTimer.current); }; const scheduleClose = () => { clearTimeout(openTimer.current); clearTimeout(closeTimer.current); closeTimer.current = setTimeout(() => setWorkOpen(false), 180); }; React.useEffect(() => () => { clearTimeout(openTimer.current); clearTimeout(closeTimer.current); }, []); React.useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 20); window.addEventListener("scroll", onScroll); return () => window.removeEventListener("scroll", onScroll); }, []); React.useEffect(() => { const update = () => { const d = new Date(); const opts = { timeZone: "America/New_York", hour: "2-digit", minute: "2-digit", hour12: false }; setTime(new Intl.DateTimeFormat("en-US", opts).format(d) + " NYC"); }; update(); const t = setInterval(update, 30000); return () => clearInterval(t); }, []); const items = [ ["About", "about.html"], ["Contact", "contact.html"], ]; return (
Full Suit Media ®
{time} Start a project
Work
{SUITS.map((s) => {s.name} )} Retainers
About Contact Start a project
); } window.Nav = Nav;