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: ['executors', 'generators'].includes(segment) ? '/' + segments.slice(0, index).join('/') + '#' + segment : '/' + segments.slice(0, index + 1).join('/'), current: '/' + segments.slice(0, index + 1).join('/') === cleanedPath, })), ]; const hasRef = path.includes('?') ? path.slice(0, path.indexOf('?')) : ''; return (