Skip to content

Commit

Permalink
Merge pull request #2667 from jeff-phillips-18/RHOAIENG-4994
Browse files Browse the repository at this point in the history
[RHOAIENG-4994] Navigate to workbenches section after create
  • Loading branch information
openshift-merge-bot[bot] authored Apr 5, 2024
2 parents b2aa275 + 52741ba commit 8168a69
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions frontend/src/pages/projects/screens/spawner/SpawnerFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { ProjectDetailsContext } from '~/pages/projects/ProjectDetailsContext';
import { AppContext } from '~/app/AppContext';
import { fireTrackingEvent } from '~/utilities/segmentIOUtils';
import usePreferredStorageClass from '~/pages/projects/screens/spawner/storage/usePreferredStorageClass';
import { ProjectSectionID } from '~/pages/projects/screens/detail/types';
import {
createPvcDataForNotebook,
createConfigMapsAndSecretsForNotebook,
Expand Down Expand Up @@ -99,7 +100,7 @@ const SpawnerFooter: React.FC<SpawnerFooterProps> = ({
notebookName: name,
});
refreshAllProjectData();
navigate(`/projects/${projectName}`);
navigate(`/projects/${projectName}?section=${ProjectSectionID.WORKBENCHES}`);
};
const handleError = (e: Error) => {
setErrorMessage(e.message || 'Error creating workbench');
Expand Down Expand Up @@ -266,7 +267,9 @@ const SpawnerFooter: React.FC<SpawnerFooterProps> = ({
<Button
variant="link"
id="cancel-button"
onClick={() => navigate(`/projects/${projectName}`)}
onClick={() =>
navigate(`/projects/${projectName}?section=${ProjectSectionID.WORKBENCHES}`)
}
>
Cancel
</Button>
Expand Down

0 comments on commit 8168a69

Please sign in to comment.