From 84c95d0ff6d8a553a46b05320d5f861923aa650c Mon Sep 17 00:00:00 2001 From: Tim <47184194+imgde@users.noreply.github.com> Date: Sun, 22 Jun 2025 12:17:34 +0200 Subject: [PATCH] fix Navbar User Icon after logout --- 01-frontend/src/helper/navbar/NavBar.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/01-frontend/src/helper/navbar/NavBar.tsx b/01-frontend/src/helper/navbar/NavBar.tsx index cfd622b..5bd0d88 100644 --- a/01-frontend/src/helper/navbar/NavBar.tsx +++ b/01-frontend/src/helper/navbar/NavBar.tsx @@ -124,6 +124,9 @@ export default function NavBar() { if (user !== undefined && user !== null) { setAvatarName(user.email.toUpperCase()); } + if (!user) { + setAvatarName(''); + } }, [user]); const handleSearch = (_: React.SyntheticEvent, value: string | null) => {