From 63bed7a30ddd71f5835d6dd95382c89436a26ae8 Mon Sep 17 00:00:00 2001 From: mabashian Date: Wed, 8 Apr 2020 11:08:30 -0400 Subject: [PATCH] Fixes issue where job type redirects weren't firing correctly --- awx/ui_next/src/screens/Job/Jobs.jsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/awx/ui_next/src/screens/Job/Jobs.jsx b/awx/ui_next/src/screens/Job/Jobs.jsx index e1d5e4e528..607dfda2e6 100644 --- a/awx/ui_next/src/screens/Job/Jobs.jsx +++ b/awx/ui_next/src/screens/Job/Jobs.jsx @@ -19,7 +19,6 @@ import { JOB_TYPE_URL_SEGMENTS } from '@constants'; function Jobs({ i18n }) { const history = useHistory(); const location = useLocation(); - const { id } = useParams(); const match = useRouteMatch(); const [breadcrumbConfig, setBreadcrumbConfig] = useState({ '/jobs': i18n._(t`Jobs`), @@ -42,6 +41,12 @@ function Jobs({ i18n }) { [i18n] ); + function TypeRedirect({ view }) { + const { id } = useParams(); + const { path } = useRouteMatch(); + return ; + } + return ( <> @@ -55,10 +60,10 @@ function Jobs({ i18n }) { - + - + - +