feat: redirect to not allowed page
This commit is contained in:
@ -33,7 +33,7 @@ const AdminLayout: FC = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!profile?.isAdmin) {
|
if (!profile?.isAdmin) {
|
||||||
return <Navigate to="/" />;
|
return <Navigate to="/not-allowed" />;
|
||||||
}
|
}
|
||||||
|
|
||||||
return <Outlet />;
|
return <Outlet />;
|
||||||
|
Reference in New Issue
Block a user