"use client"; import Image from "next/image"; import Link from "next/link"; import { useState } from "react"; import SearchBox from "./SearchBox"; import AccountMenu from "./AccountMenu"; import CartButton from "./CartButton"; import { ChevronDown, GridIcon, PhoneIcon } from "./icons"; import { MAIN_NAV, PHONE, PHONE_HREF, SITE_NAME } from "@/data/site"; import { categoryHref } from "@/lib/slug"; import type { AuthUser, CategoryNode } from "@/lib/types"; // Two rows: logo + search + account/cart, then the product mega menu and the // main nav — the same split the reference storefront uses. export default function Header({ menu, user, logoUrl, }: { menu: CategoryNode[]; user: AuthUser | null; logoUrl: string; }) { const [megaOpen, setMegaOpen] = useState(false); return (
{/* Mobile keeps the header down to the search box alone — account, cart and browsing live in the fixed bottom bar instead. The row is taller on lg so the desktop logo has room without cramming the search box/buttons beside it. */}
{/* h-[70px] w-auto (not a fixed box) so a square dashboard logo mark and the wide fallback wordmark both render undistorted. */} {SITE_NAME}
); }