Skip to content

Commit

Permalink
Navigate to model page instead of version page after registering version
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Turley <[email protected]>
  • Loading branch information
mturley committed Aug 16, 2024
1 parent c73e585 commit 7586ac5
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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 = () =>
Expand Down

0 comments on commit 7586ac5

Please sign in to comment.