Javascript – How to implement role based routing
How can I implement role based access control here: I have a useAuth hook that gets the logged in user role. I want some pages to be accessed only by the Admin. I tried to pass the allowedRoles prop to…