"use client"; import { Select, SelectContent, SelectItem, SelectTrigger, } from "@/components/ui/select"; import { Link, useRouter } from "@/i18n/routing"; import { cn } from "@/lib/utils"; import { Popover, Transition } from "@headlessui/react"; import { HeartIcon } from "lucide-react"; import { useLocale, useTranslations } from "next-intl"; import { Fragment, type JSX, type SVGProps } from "react"; import { Container } from "./Container"; import { NavLink } from "./NavLink"; import { trackGAEvent } from "./analitycs"; import { Logo } from "./shared/Logo"; import { Button, buttonVariants } from "./ui/button"; function MobileNavLink({ href, children, target, }: { href: string; children: React.ReactNode; target?: string; }) { return ( { trackGAEvent({ action: "Nav Link Clicked", category: "Navigation", label: href, }); }} as={Link} href={href} target={target} className="block w-full p-2" > {children} ); } function MobileNavIcon({ open }: { open: boolean }) { return ( ); } const I18nIcon = (props: JSX.IntrinsicAttributes & SVGProps) => ( ); function MobileNavigation() { const t = useTranslations("HomePage"); const linkT = useTranslations("Link"); return ( {({ open }) => } {t("navigation.features")} {/* Testimonials */} {t("navigation.faqs")} {t("navigation.docs")} ); } export function Header() { const router = useRouter(); const locale = useLocale(); const t = useTranslations("HomePage"); const linkT = useTranslations("Link"); return ( {t("navigation.features")} {/* Testimonials */} {t("navigation.faqs")} {t("navigation.docs")} { router.replace("/", { locale: locale as "en" | "zh-Hans", }); }} value={locale} > {t("navigation.i18nEn")} {t("navigation.i18nZh-Hans")} {t("navigation.support")}{" "} {t("navigation.discord")} ); }