"use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { ChevronRight, Home } from "lucide-react"; import { cn } from "@/lib/utils"; // Route label mappings const routeLabels: Record = { "/": "Dashboard", "/activity": "Activity", "/calendar": "Calendar", "/tasks": "Tasks", "/projects": "Projects", "/documents": "Documents", "/tools": "Tools", "/mission": "Mission", }; interface BreadcrumbItem { href: string; label: string; isLast: boolean; } export function Breadcrumbs() { const pathname = usePathname(); // Generate breadcrumb items from pathname const getBreadcrumbItems = (): BreadcrumbItem[] => { const items: BreadcrumbItem[] = [ { href: "/", label: "Home", isLast: pathname === "/" }, ]; // Skip home for other paths if (pathname === "/") return items; // Add current page const label = routeLabels[pathname] || pathname.split("/").pop() || ""; items.push({ href: pathname, label: label.charAt(0).toUpperCase() + label.slice(1), isLast: true, }); return items; }; const items = getBreadcrumbItems(); return ( ); }