From f097636923ca70cca21b1de0afd8cae2b4f573c5 Mon Sep 17 00:00:00 2001 From: Mike Turley Date: Fri, 16 Aug 2024 10:48:34 -0400 Subject: [PATCH] Navigate to model page instead of version page after registering version Signed-off-by: Mike Turley --- .../screens/RegisterModel/RegisterVersion.tsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/frontend/src/pages/modelRegistry/screens/RegisterModel/RegisterVersion.tsx b/frontend/src/pages/modelRegistry/screens/RegisterModel/RegisterVersion.tsx index 92f787e435..257998be4c 100644 --- a/frontend/src/pages/modelRegistry/screens/RegisterModel/RegisterVersion.tsx +++ b/frontend/src/pages/modelRegistry/screens/RegisterModel/RegisterVersion.tsx @@ -13,11 +13,7 @@ import spacing from '@patternfly/react-styles/css/utilities/Spacing/spacing'; import { useParams, useNavigate } from 'react-router'; import { Link } from 'react-router-dom'; import ApplicationsPage from '~/pages/ApplicationsPage'; -import { - modelRegistryUrl, - modelVersionUrl, - registeredModelUrl, -} from '~/pages/modelRegistry/screens/routeUtils'; +import { modelRegistryUrl, registeredModelUrl } from '~/pages/modelRegistry/screens/routeUtils'; import useRegisteredModels from '~/concepts/modelRegistry/apiHooks/useRegisteredModels'; import { filterLiveModels } from '~/concepts/modelRegistry/utils'; import { ValueOf } from '~/typeHelpers'; @@ -58,8 +54,8 @@ const RegisterVersion: React.FC = () => { return; // We shouldn't be able to hit this due to form validation } handleSubmit(async () => { - const { modelVersion } = await registerVersion(apiState, registeredModel, formData, author); - navigate(modelVersionUrl(modelVersion.id, registeredModel.id, mrName)); + await registerVersion(apiState, registeredModel, formData, author); + navigate(registeredModelUrl(registeredModel.id, mrName)); }); }; const onCancel = () =>