From 25caa59a47e8d0ee872b19086df4c9aee0e21d81 Mon Sep 17 00:00:00 2001 From: chidube anike Date: Mon, 28 Oct 2024 14:30:18 +0100 Subject: [PATCH] proper state management to render username of get started button --- src/components/Header.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 26da32b..95c4595 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -26,7 +26,7 @@ const userMenuItems = [ ]; export default function Header() { - const [isLoggedIn, setIsLoggedIn] = useState(false); + const [isLoggedIn, setIsLoggedIn] = useState(!!getToken()); const [isMenuOpen, setIsMenuOpen] = useState(false); const [isUserMenuOpen, setIsUserMenuOpen] = useState(false); const { cartItems } = useCart();