Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions app/src/App/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,7 @@ const resources = customWrapRoute({
visibility: 'anything',
},
});

const operationalLearning = customWrapRoute({
parent: rootLayout,
path: 'operational-learning',
Expand Down Expand Up @@ -1174,6 +1175,20 @@ const perWorkPlanForm = customWrapRoute({
},
});

const aboutRedirect = customWrapRoute({
parent: rootLayout,
path: '/about',
component: {
render: () => import('#views/Resources'),
props: {},
},
wrapperComponent: Auth,
context: {
title: 'Resources',
visibility: 'anything',
},
});

Comment on lines +1178 to +1191
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not render Resources page directly, we should use Navigate component to route to the resources page.
For example, https://github.com/IFRCGo/go-web-app/blob/6d755498fa096679ebd817fdb1efe9d7e94a2398/app/src/App/routes/index.tsx#L1178C1-L1193C4

// Redirect Routes
const preparednessOperationalLearning = customWrapRoute({
parent: preparednessLayout,
Expand Down Expand Up @@ -1306,6 +1321,7 @@ const wrappedRoutes = {
threeWProjectDetail,
termsAndConditions,
operationalLearning,
aboutRedirect,
...regionRoutes,
...countryRoutes,
...surgeRoutes,
Expand Down