// Quantum Spaces — Nav + Footer. function Nav() { const links = [ ["The problem", "problem"], ["Why now", "whynow"], ["Four pillars", "pillars"], ["How we work", "principles"], ["Get involved", "involved"], ]; const [open, setOpen] = React.useState(false); const jump = (id) => { const el = document.getElementById(id); if (el) window.scrollTo({ top: el.offsetTop - 62, behavior: "smooth" }); setOpen(false); }; return ( QuantumSpaces {links.map(([label, id]) => ( jump(id)}>{label} ))} setOpen(!open)}> {links.map(([label, id]) => ( jump(id)}>{label} ))} ); } function Footer() { return ( ); } Object.assign(window, { Nav, Footer });