"use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { useState, useEffect } from "react"; import { Menu, X, Zap, ChevronDown } from "lucide-react"; type NavItem = { label: string; href?: string; dropdown?: { label: string; href: string }[]; }; const navLinks: NavItem[] = [ { label: "Platform", dropdown: [ { label: "Product Overview", href: "/product" }, { label: "All Features", href: "/features" }, { label: "Use Cases", href: "/use-cases" }, ], }, { label: "Pricing", href: "/plans" }, { label: "Company", dropdown: [ { label: "About Us", href: "/about" }, { label: "Contact", href: "/contact" }, ], }, ]; export default function MarketingHeader() { const pathname = usePathname(); const [open, setOpen] = useState(false); const [scrolled, setScrolled] = useState(false); useEffect(() => { const handler = () => setScrolled(window.scrollY > 12); window.addEventListener("scroll", handler, { passive: true }); return () => window.removeEventListener("scroll", handler); }, []); return (
{/* Mobile menu */}
    {navLinks.map((navItem) => (
  • {navItem.dropdown ? (
    {navItem.label}
    {navItem.dropdown.map((sub) => ( setOpen(false)} > {sub.label} ))}
    ) : ( setOpen(false)} > {navItem.label} )}
  • ))}
setOpen(false)} > Log in setOpen(false)} > Start for Free
); }