From b70ae164e1efcad1e7ff21f8ae1f3e82fd20a937 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Thu, 8 Jan 2026 09:38:42 +0700 Subject: [PATCH] feat: format pathname --- src/components/MainDrawer.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/MainDrawer.tsx b/src/components/MainDrawer.tsx index fc8cbb18..eaf1e2c1 100644 --- a/src/components/MainDrawer.tsx +++ b/src/components/MainDrawer.tsx @@ -67,7 +67,9 @@ const MainDrawer = ({ const pathname = usePathname(); const { permissionCheck } = useAuth(); - const isPermitted = ROUTE_PERMISSIONS[pathname]?.some((permission) => + const formattedPathname = pathname.endsWith('/') ? pathname : `${pathname}/`; + + const isPermitted = ROUTE_PERMISSIONS[formattedPathname]?.some((permission) => permissionCheck(permission) );