import React from "react"; import { Link } from "react-router-dom"; import { Breadcrumb, BreadcrumbItem } from "@patternfly/react-core"; import useBreadcrumbs from "use-react-router-breadcrumbs"; import { useTranslation } from "react-i18next"; import { routes } from "../../route-config"; export const PageBreadCrumbs = () => { const { t } = useTranslation(); const crumbs = useBreadcrumbs(routes(t)); return ( {crumbs.map(({ match, breadcrumb: crumb }, i) => ( {crumbs.length - 1 !== i && {crumb}} {crumbs.length - 1 === i && <>{crumb}} ))} ); };