How can I protect role based route in react
I want to setup react project where I have 3 roles like User, Author and etc.. and 3 of them have different UI or dashboard. So when user logged based on role of that user it should redirect to that base route of that role e.g. like /user/home or /author/home or when author tries to hit /user/ routes it should not be accessible.