Skip to content

Commit

Permalink
fix(routeManager.tsx): update publicRoutes function to filter routes …
Browse files Browse the repository at this point in the history
…by non-protected access

The publicRoutes function has been updated to filter routes based on access not being 'protected' instead of specifically being 'public'. This change allows for more flexibility in defining route access levels and ensures that routes marked as 'protected' are excluded from the publicRoutes list.
  • Loading branch information
ktun95 committed Feb 19, 2024
1 parent 1b8da80 commit 5760c66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/auth/src/functional/routeManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const mapToRouteObject = (route: string, value: PageComponentData) => {
const publicRoutes = (allRoutes: dynamicRoutesProperties): Array<RouteObject> =>
pipe(
allRoutes,
Rfilter((v) => v.access === ACCESS.public),
Rfilter((v) => v.access !== ACCESS.protected),
Rcollect(Ord)(mapToRouteObject),
)

Expand Down

0 comments on commit 5760c66

Please sign in to comment.