From 307165db0c0911b442ef4ed3c2ca3f58840227a1 Mon Sep 17 00:00:00 2001 From: Kevin Tun Date: Mon, 19 Feb 2024 02:06:05 -0600 Subject: [PATCH] fix(routeManager.tsx): update publicRoutes function to filter routes 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. --- 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 f0409f907f..88422643ab 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.public), + Rfilter((v) => v.access !== ACCESS.protected), Rcollect(Ord)(mapToRouteObject), )