// components/TopNav.tsx "use client"; import Link from "next/link"; import Image from "next/image"; import { usePathname } from "next/navigation"; import { useAuth } from "@/context/AuthContext"; import ThemeToggle from "@/components/ThemeToggle"; function NavLink({ href, children, }: { href: string; children: React.ReactNode; }) { const pathname = usePathname(); const active = pathname === href; return ( {children} ); } export function TopNav() { const { user, logout, loading } = useAuth(); const isAuthenticated = !!user; return ( {/* Left: Brand / Home */} {/* Right side actions */} {loading ? ( Checking session… ) : isAuthenticated ? ( <> Vault {/* Email/displayName links to Account */} {user.displayName || user.email} Log Out > ) : ( <> Log In Join Beta > )} ); }