"use client"; import { useTranslations } from "next-intl"; import { signOut, useSession } from "next-auth/react"; import { usePathname } from "@/i18n/navigation"; import { Link } from "@/i18n/navigation"; import { SessionProvider } from "next-auth/react"; import { LanguageSwitcher } from "@/components/ui/language-switcher"; function NavBar() { const t = useTranslations("common"); const { data: session } = useSession(); const pathname = usePathname(); const user = (session as any)?.platformUser; const isLogin = pathname === "/login"; if (isLogin) return null; return (
{/* Logo / brand */}
{/* Geometric mark */}
{t("appName")} {t("tagline")} {/* Nav links */}
{/* Right side */}
{user && ( {user.orgName} )}
); } function NavLink({ href, active, children, }: { href: string; active: boolean; children: React.ReactNode; }) { return ( {children} ); } export function NavShell({ children }: { children: React.ReactNode }) { return (
{children}
); }