"use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { useCart } from "@/context/CartContext"; import ThemeToggle from "@/components/shared/ThemeToggle"; const BRAND_NAMES: Record = { tuxedo: "Tuxedo Corn", "indian-river-direct": "Indian River Direct", }; export default function SiteHeader() { const { cart } = useCart(); const pathname = usePathname(); const showBrandName = pathname?.startsWith("/tuxedo") || pathname?.startsWith("/indian-river-direct"); const brandKey = pathname?.split("/")[1]; const brandName = brandKey ? BRAND_NAMES[brandKey] : null; return (
{showBrandName && brandName ? ( {brandName} ) : ( Route Commerce )}
); }