Skip to content

Commit 51237c8

Browse files
committed
settings route will be rerouted to the account-settings
1 parent 4434034 commit 51237c8

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

packages/manager/src/routes/accountSettings/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,13 @@ export const accountSettingsRouteTree = accountSettingsRoute.addChildren([
4040
accountSettingsIndexRoute,
4141
accountSettingsCatchAllRoute,
4242
]);
43+
44+
// This supports redirecting from /settings, which was initially used to redirect to /account/settings,
45+
// and has now been changed to /account-settings.
46+
export const settingsRouteTree = createRoute({
47+
getParentRoute: () => rootRoute,
48+
path: 'settings',
49+
beforeLoad: () => {
50+
throw redirect({ to: '/account-settings' });
51+
},
52+
});

packages/manager/src/routes/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import React from 'react';
66
import { ErrorComponent } from 'src/features/ErrorBoundary/ErrorComponent';
77

88
import { accountRouteTree } from './account';
9-
import { accountSettingsRouteTree } from './accountSettings';
9+
import { accountSettingsRouteTree, settingsRouteTree } from './accountSettings';
1010
import { cloudPulseAlertsRouteTree } from './alerts';
1111
import {
1212
cancelLandingRoute,
@@ -86,6 +86,7 @@ export const routeTree = rootRoute.addChildren([
8686
quotasRouteTree,
8787
searchRouteTree,
8888
serviceTransfersRouteTree,
89+
settingsRouteTree,
8990
stackScriptsRouteTree,
9091
supportRouteTree,
9192
usersAndGrantsRouteTree,

0 commit comments

Comments
 (0)