diff --git a/awx/ui_next/src/components/Breadcrumbs/Breadcrumbs.jsx b/awx/ui_next/src/components/Breadcrumbs/Breadcrumbs.jsx
index fade4ce046..670a4d01a3 100644
--- a/awx/ui_next/src/components/Breadcrumbs/Breadcrumbs.jsx
+++ b/awx/ui_next/src/components/Breadcrumbs/Breadcrumbs.jsx
@@ -7,7 +7,7 @@ import {
BreadcrumbItem,
BreadcrumbHeading,
} from '@patternfly/react-core';
-import { Link, Route, withRouter, useRouteMatch } from 'react-router-dom';
+import { Link, Route, useRouteMatch } from 'react-router-dom';
import styled from 'styled-components';
@@ -16,21 +16,22 @@ const PageSection = styled(PFPageSection)`
padding-bottom: 10px;
`;
-const Breadcrumbs = ({ breadcrumbConfig, match }) => {
+const Breadcrumbs = ({ breadcrumbConfig }) => {
const { light } = PageSectionVariants;
return (
-
+
);
};
-const Crumb = ({ breadcrumbConfig, match }) => {
+const Crumb = ({ breadcrumbConfig }) => {
+ const match = useRouteMatch();
const crumb = breadcrumbConfig[match.url];
let crumbElement = (
@@ -49,16 +50,11 @@ const Crumb = ({ breadcrumbConfig, match }) => {
crumbElement = null;
}
- function NextCrumb() {
- const routeMatch = useRouteMatch();
- return ;
- }
-
return (
{crumbElement}
-
+
);
@@ -72,4 +68,4 @@ Crumb.propTypes = {
breadcrumbConfig: PropTypes.objectOf(PropTypes.string).isRequired,
};
-export default withRouter(Breadcrumbs);
+export default Breadcrumbs;