Sometime we have a list of routes for specific user roles, such as admin, user, editor, etc. In this case, we want to show the role based routes permission then we can use RoleBasedGuard component from app.
RoleBasedGuard.jsx
_19
"use client";
_19
_19
import { PropsWithChildren } from "react";
_19
import useAuth from "hooks/useAuth";
_19
import ErrorView from "page-sections/permission/ErrorView";