"use client"; import { useState, useEffect } from "react"; import Link from "next/link"; import Image from "next/image"; import Bars3Icon from "@heroicons/react/24/outline/Bars3Icon"; import XMarkIcon from "@heroicons/react/24/outline/XMarkIcon"; import ChevronUpIcon from "@heroicons/react/24/outline/ChevronUpIcon"; import { heroContent, navigation } from "@/content/marketing-content"; import { Dialog, DialogPanel } from "@headlessui/react"; import { logClientEvent } from "@/lib/axiom/client"; const logoFull = ( {heroContent.logo.alt} ); export default function Header() { const [mobileMenuOpen, setMobileMenuOpen] = useState(false); const [scrolled, setScrolled] = useState(false); const [showTopBtn, setShowTopBtn] = useState(false); useEffect(() => { const onScroll = () => { setScrolled(window.scrollY > 20); setShowTopBtn(window.scrollY > 300); }; window.addEventListener("scroll", onScroll, { passive: true }); return () => window.removeEventListener("scroll", onScroll); }, []); return ( <>
{heroContent.logo.alt} {logoFull}
{navigation.map((item) => ( item.href.includes("#") && logClientEvent("nav.anchor.click", { label: item.name, href: item.href, }) } > {item.name} ))}
{heroContent.loginText}
); }