Skip to content

Commit d008f10

Browse files
authored
Merge pull request #12841 from cpathipa/fix-rerouting-settings-accountsettings
fix: [M3-10606] - Redirects /settings to /account-settings
2 parents 6232778 + 93a0d6a commit d008f10

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

packages/manager/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
3333
- Profile preferences not retained across sessions ([#12795](https://github.com/linode/manager/pull/12795))
3434
- Make a Payment and Add Payment drawers not closing when browser back button is clicked ([#12796](https://github.com/linode/manager/pull/12796))
3535
- Node Pool footer layout ([#12798](https://github.com/linode/manager/pull/12798))
36+
- Redirects /settings to /account-settings ([#12841](https://github.com/linode/manager/pull/12841))
3637

3738
### Removed:
3839

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

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

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)