import { ChevronRightIcon } from '@heroicons/react/24/solid'; import classNames from 'classnames'; export function Breadcrumbs({ path }: { path: string }): JSX.Element { const cleanedPath = path.includes('?') ? path.slice(0, path.indexOf('?')) : path; const pages = [ ...cleanedPath .split('/') .filter(Boolean) .map((segment, index, segments) => ({ name: segment.includes('#') ? segment.slice(0, segment.indexOf('#')) : segment, // We do not have dedicated page view for executors & generators href: '/' + segments.slice(0, index + 1).join('/'), current: '/' + segments.slice(0, index + 1).join('/') === cleanedPath, })), ]; const hasRef = path.includes('?') ? path.slice(0, path.indexOf('?')) : ''; if (pages.length === 1) { return <>; } return (
); }