mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 23:35:45 +00:00
feat: format pathname
This commit is contained in:
@@ -67,7 +67,9 @@ const MainDrawer = ({
|
|||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
const { permissionCheck } = useAuth();
|
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)
|
permissionCheck(permission)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user