function Nav() { const [scrolled, setScrolled] = React.useState(false); const diag = typeof location !== "undefined" && /[?&]diag=1/.test(location.search); React.useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 60); window.addEventListener("scroll", onScroll); return () => window.removeEventListener("scroll", onScroll); }, []); const links = ["WORK", "SERVICES", "CONTACT"]; return ( ); } window.Nav = Nav;