import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from '@/components/ui/breadcrumb'; import { type BreadcrumbItem as BreadcrumbItemType } from '@/types'; import { Link } from '@inertiajs/react'; import { Fragment } from 'react'; export function Breadcrumbs({ breadcrumbs }: { breadcrumbs: BreadcrumbItemType[] }) { return ( <> {breadcrumbs.length > 0 && ( {breadcrumbs.map((item, index) => { const isLast = index === breadcrumbs.length - 1; return ( {isLast ? ( {item.title} ) : ( {item.title} )} {!isLast && } ); })} )} ); }