Fix jwt-token
This commit is contained in:
@@ -36,7 +36,7 @@ const Layout = () => {
|
|||||||
|
|
||||||
// Build navigation based on user permissions
|
// Build navigation based on user permissions
|
||||||
const navigation = React.useMemo(() => {
|
const navigation = React.useMemo(() => {
|
||||||
if (!user) {
|
if (!user?.role) {
|
||||||
return baseNavigation; // Return base navigation if user not loaded yet
|
return baseNavigation; // Return base navigation if user not loaded yet
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ const Layout = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return nav;
|
return nav;
|
||||||
}, [user?.role]);
|
}, [user]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen flex bg-gray-100">
|
<div className="min-h-screen flex bg-gray-100">
|
||||||
|
|||||||
Reference in New Issue
Block a user