import { Link } from 'react-router-dom'; import { BreadcrumbItem } from '@patternfly/react-core'; import { GROUP_DETAILS_PATH, GROUPS_PATH } from '@routes/paths'; import { useNamespace } from '~/shared/providers/Namespace'; export const useComponentGroupBreadcrumbs = (groupName?: string) => { const namespace = useNamespace(); return [ {groupName ? ( Groups ) : ( Groups )} , ...(groupName ? [ { path: GROUP_DETAILS_PATH.createPath({ workspaceName: namespace, groupName }), name: groupName, }, ] : []), ]; };