'use client'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import { ChevronRight, Home } from 'lucide-react'; import { Fragment } from 'react'; export function Breadcrumb() { const pathname = usePathname(); // Generate breadcrumb items from pathname const segments = pathname.split('/').filter(Boolean); // Don't show breadcrumb on dashboard if (segments.length === 0 || pathname === '/dashboard') { return null; } const breadcrumbItems = segments.map((segment, index) => { const href = '/' + segments.slice(0, index + 1).join('/'); const label = segment .split('-') .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) .join(' '); return { label, href, isLast: index === segments.length - 1, }; }); return ( ); }