import Link from "next/link"; import { headers } from "next/headers"; import { ChefHat } from "lucide-react"; import { auth } from "@/lib/auth/server"; import { buttonVariants } from "@/components/ui/button"; import { cn } from "@/lib/utils"; import { getMessages } from "@/lib/i18n/server"; import { getEffectiveMarketingLocale } from "@/lib/marketing-locale"; import { isSignupsDisabled } from "@/lib/site-settings"; import { LanguageSwitcher } from "./language-switcher"; import { ThemeToggle } from "./theme-toggle"; const LINKS = [ { href: "/features", key: "features" }, { href: "/about", key: "about" }, ] as const; export async function MarketingNav() { const [session, locale, signupsDisabled] = await Promise.all([ auth.api.getSession({ headers: await headers() }).catch(() => null), getEffectiveMarketingLocale(), isSignupsDisabled(), ]); const m = getMessages(locale); return (
Epicure
{session ? ( {m.marketing.nav.openApp} ) : ( <> {m.marketing.nav.login} {signupsDisabled ? m.marketing.nav.signupClosed : m.marketing.nav.signup} )}
); }