mirror of
https://github.com/ansible/awx.git
synced 2026-05-16 05:47:38 -02:30
Replace withRouter with react-router hooks in RoutedTabs
This commit is contained in:
@@ -5,7 +5,6 @@ import { Card, PageSection } from '@patternfly/react-core';
|
||||
import {
|
||||
Switch,
|
||||
useParams,
|
||||
useHistory,
|
||||
useLocation,
|
||||
Route,
|
||||
Redirect,
|
||||
@@ -22,7 +21,6 @@ function Credential({ i18n, setBreadcrumb }) {
|
||||
const [credential, setCredential] = useState(null);
|
||||
const [contentError, setContentError] = useState(null);
|
||||
const [hasContentLoading, setHasContentLoading] = useState(true);
|
||||
const history = useHistory();
|
||||
const location = useLocation();
|
||||
const { id } = useParams();
|
||||
|
||||
@@ -53,7 +51,7 @@ function Credential({ i18n, setBreadcrumb }) {
|
||||
|
||||
let cardHeader = hasContentLoading ? null : (
|
||||
<TabbedCardHeader>
|
||||
<RoutedTabs history={history} tabsArray={tabsArray} />
|
||||
<RoutedTabs tabsArray={tabsArray} />
|
||||
<CardCloseButton linkTo="/credentials" />
|
||||
</TabbedCardHeader>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user