From e4d557192d004cf4b40d1a446ee135bae78b0b7d Mon Sep 17 00:00:00 2001 From: Alexander Borg Date: Sat, 13 Sep 2025 22:25:51 +0200 Subject: [PATCH] Fix jwt-token --- client/src/components/Layout.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/Layout.jsx b/client/src/components/Layout.jsx index b6ce03b..16ff011 100644 --- a/client/src/components/Layout.jsx +++ b/client/src/components/Layout.jsx @@ -36,7 +36,7 @@ const Layout = () => { // Build navigation based on user permissions const navigation = React.useMemo(() => { - if (!user) { + if (!user?.role) { return baseNavigation; // Return base navigation if user not loaded yet } @@ -53,7 +53,7 @@ const Layout = () => { } return nav; - }, [user?.role]); + }, [user]); return (