From 5f6fd095f5884e6d02c4c9fc19fc587b31ddfe5d Mon Sep 17 00:00:00 2001 From: Kevin Tun Date: Mon, 19 Feb 2024 01:06:48 -0600 Subject: [PATCH] fix(routeManager.tsx): update publicRoutes function to correctly filter 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. --- packages/auth/src/functional/routeManager.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/auth/src/functional/routeManager.tsx b/packages/auth/src/functional/routeManager.tsx index 88422643ab..f0409f907f 100644 --- a/packages/auth/src/functional/routeManager.tsx +++ b/packages/auth/src/functional/routeManager.tsx @@ -80,7 +80,7 @@ const mapToRouteObject = (route: string, value: PageComponentData) => { const publicRoutes = (allRoutes: dynamicRoutesProperties): Array => pipe( allRoutes, - Rfilter((v) => v.access !== ACCESS.protected), + Rfilter((v) => v.access === ACCESS.public), Rcollect(Ord)(mapToRouteObject), )