"use client"; import { useAuth } from "@/lib/auth"; import { useRouter, usePathname } from "next/navigation"; function getPageTitle(pathname: string): string { if (pathname === "/") return "Dashboard"; if (pathname.startsWith("/onboarding")) return "Onboarding"; if (pathname.startsWith("/skills")) return "Skills Explorer"; if (pathname.startsWith("/demo")) return "Query Agent"; if (pathname.startsWith("/compile")) return "Compile Pipeline"; return "Kernl"; } export default function TopBar() { const { user, logout, loading } = useAuth(); const router = useRouter(); const pathname = usePathname(); const pageTitle = getPageTitle(pathname); return (
{/* Left: Breadcrumb */}
Kernl / {pageTitle}
{/* Right: User */}
{!loading && user ? ( <> {user.email} ) : !loading ? (
) : null}
); }