import Container from 'react-bootstrap/Container'; import Nav from 'react-bootstrap/Nav'; import Navbar from 'react-bootstrap/Navbar'; import Button from 'react-bootstrap/Button'; import { Stack } from 'react-bootstrap'; import { useNavigate } from 'react-router-dom'; export default function ANavbar() { const navigate = useNavigate(); function handleLogout() { sessionStorage.setItem('isLoggedIn','false'); sessionStorage.removeItem('username'); sessionStorage.removeItem('cart'); navigate('/'); } let username = sessionStorage.getItem('username'); let isLoggedIn = sessionStorage.getItem('isLoggedIn'); let userContent; if (isLoggedIn === 'true') { userContent = <> {' '} } else { userContent = <> {' '} } return ( {' '} CATS-Shop {userContent} ) }