fix: format pathname

This commit is contained in:
ValdiANS
2026-01-07 13:57:00 +07:00
parent b421bc48d0
commit 50d499005d
+3 -1
View File
@@ -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)
);