Skip to content

Commit 1d4503f

Browse files
committed
Fix redirect for personnel/all
1 parent a4b6bd3 commit 1d4503f

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

src/App/routes/index.tsx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2437,9 +2437,10 @@ const allSurgeAlerts = customWrapRoute({
24372437
},
24382438
});
24392439

2440+
type AllDeployedPersonnelPath = 'deployed-personnels/all';
24402441
const allDeployedPersonnel = customWrapRoute({
24412442
parent: rootLayout,
2442-
path: 'deployed-personnels/all',
2443+
path: 'deployed-personnels/all' satisfies AllDeployedPersonnelPath,
24432444
component: {
24442445
render: () => import('#views/AllDeployedPersonnel'),
24452446
props: {},
@@ -2451,6 +2452,24 @@ const allDeployedPersonnel = customWrapRoute({
24512452
},
24522453
});
24532454

2455+
const allDeployedPersonnelOld = customWrapRoute({
2456+
parent: rootLayout,
2457+
path: 'personnels/all',
2458+
component: {
2459+
eagerLoad: true,
2460+
render: Navigate,
2461+
props: {
2462+
to: 'deployed-personnels/all' satisfies AllDeployedPersonnelPath,
2463+
replace: true,
2464+
},
2465+
},
2466+
wrapperComponent: Auth,
2467+
context: {
2468+
title: 'All Deployed Personnel',
2469+
visibility: 'anything',
2470+
},
2471+
});
2472+
24542473
const allDeployedEmergencyResponseUnits = customWrapRoute({
24552474
parent: rootLayout,
24562475
path: 'deployed-erus/all',
@@ -3033,6 +3052,7 @@ const wrappedRoutes = {
30333052
allSurgeAlerts,
30343053
allFlashUpdates,
30353054
allDeployedPersonnel,
3055+
allDeployedPersonnelOld,
30363056
allDeployedEmergencyResponseUnits,
30373057
newDrefApplicationForm,
30383058
drefApplicationForm,

0 commit comments

Comments
 (0)