"use client"; import { useState } from "react"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { useAuth } from "@/components/AuthProvider"; import { LinkButton } from "@/components/ui/Button"; const LINKS = [ { href: "/features", label: "Features" }, { href: "/pricing", label: "Pricing" }, { href: "/faq", label: "FAQ" }, ]; export function MarketingHeader() { const pathname = usePathname(); const { user, loading } = useAuth(); const [mobileOpen, setMobileOpen] = useState(false); return (
D DRB
{!loading && user ? ( Go to dashboard ) : ( <> Sign in Get started )}
{mobileOpen && (
{LINKS.map(({ href, label }) => ( setMobileOpen(false)} className={`py-2 text-sm font-mono transition-colors ${pathname === href ? "text-white" : "text-gray-400"}`} > {label} ))}
{!loading && user ? ( Go to dashboard ) : ( <> Sign in Get started )}
)}
); }