'use client' import Link from 'next/link' import { usePathname } from 'next/navigation' import { useStore } from '@/lib/store' import { Menu, X, TrendingUp, Gavel, CreditCard, LayoutDashboard, Tag, } from 'lucide-react' import { useState, useEffect } from 'react' import clsx from 'clsx' /** * Public Header Component * * Used for: * - Landing page (/) * - Public pages (pricing, about, contact, blog, etc.) * - Auth pages (login, register) * * For logged-in users in the Command Center, use TerminalLayout instead. */ export function Header() { const pathname = usePathname() const { isAuthenticated, user, logout, subscription } = useStore() const [mobileMenuOpen, setMobileMenuOpen] = useState(false) // Close mobile menu on route change useEffect(() => { setMobileMenuOpen(false) }, [pathname]) const tierName = subscription?.tier_name || subscription?.tier || 'Scout' // Public navigation - same for all visitors const publicNavItems = [ { href: '/auctions', label: 'Auctions', icon: Gavel }, { href: '/buy', label: 'Marketplace', icon: Tag }, { href: '/tld-pricing', label: 'TLD Pricing', icon: TrendingUp }, { href: '/pricing', label: 'Pricing', icon: CreditCard }, ] const isActive = (href: string) => { if (href === '/') return pathname === '/' return pathname.startsWith(href) } // Check if we're on a Command Center page (should use Sidebar instead) const isCommandCenterPage = pathname.startsWith('/terminal') || pathname.startsWith('/admin') // If logged in and on Command Center page, don't render this header if (isAuthenticated && isCommandCenterPage) { return null } return (
{/* Left side: Logo + Nav Links */}
{/* Logo */} POUNCE {/* Main Nav Links (Desktop) */}
{/* Right side */} {/* Mobile Menu Button */}
{/* Mobile Menu */} {mobileMenuOpen && (
)}
) }