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) );