Skip to content

Commit

Permalink
fix(routeManager.tsx): update publicRoutes function to correctly filt…
Browse files Browse the repository at this point in the history
…er public routes only

The publicRoutes function was updated to correctly filter routes based on the access level. Now, only routes with ACCESS.public are included in the resulting array, ensuring that only public routes are returned as intended.
  • Loading branch information
ktun95 committed Feb 19, 2024
1 parent 01a8a53 commit 5f6fd09
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.protected),
Rfilter((v) => v.access === ACCESS.public),
Rcollect(Ord)(mapToRouteObject),
)

Expand Down

0 comments on commit 5f6fd09

Please sign in to comment.