"use client" import { usePathname } from "next/navigation" import Link from "next/link" import { ChevronRight, Home } from "lucide-react" export function Breadcrumbs() { const pathname = usePathname() // Skip breadcrumbs on home page if (pathname === "/") return null // Split the pathname into segments const segments = pathname.split("/").filter(Boolean) // Create breadcrumb items const breadcrumbs = [ { name: "Home", href: "/" }, ...segments.map((segment, index) => { const href = `/${segments.slice(0, index + 1).join("/")}` // Format the segment name (capitalize first letter, replace hyphens with spaces) const name = segment.replace(/-/g, " ").replace(/\b\w/g, (char) => char.toUpperCase()) return { name, href } }), ] return ( ) }