Skip to content

Commit

Permalink
proper state management to render username of get started button
Browse files Browse the repository at this point in the history
  • Loading branch information
chidubesteve committed Oct 28, 2024
1 parent b4d02d0 commit 25caa59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 25caa59

Please sign in to comment.