Skip to content

Commit 923fa09

Browse files
committed
fix(FR-2805): correct tab key and use URLSearchParams in deployment preset navigation (#7233)
Resolves #7232 ([FR-2805](https://lablup.atlassian.net/browse/FR-2805)) ## Summary - Fix typo in the tab query parameter when navigating back from `AdminDeploymentPresetSettingPage` (`deployment-preset` → `deployment-presets`), which is the key actually registered in `AdminDeploymentListPage`. - Build the navigation URL with `URLSearchParams` instead of string concatenation for safer query handling. ## Test plan - [ ] Create a deployment preset → after save, the list page opens on the **Deployment Presets** tab. - [ ] Edit a deployment preset → after save, the list page opens on the **Deployment Presets** tab. [FR-2805]: https://lablup.atlassian.net/browse/FR-2805?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent 3fb651e commit 923fa09

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

react/src/pages/AdminDeploymentPresetSettingPage.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,14 @@ const AdminDeploymentPresetSettingPage: React.FC = () => {
203203
`,
204204
);
205205

206-
const navigateToList = () =>
207-
webuiNavigate('/admin-deployments?tab=deployment-preset');
206+
const navigateToList = () => {
207+
const params = new URLSearchParams();
208+
params.set('tab', 'deployment-presets');
209+
webuiNavigate({
210+
pathname: '/admin-deployments',
211+
search: params.toString(),
212+
});
213+
};
208214

209215
const handleSubmit = async () => {
210216
// validateFields() triggers field-level validation (shows error messages).

0 commit comments

Comments
 (0)