import {Container, Nav, Navbar, Button, Stack} from 'react-bootstrap' import { useNavigate } from 'react-router-dom'; import DataStorage from '../organisms/DataStorage'; export default function ANavbar() { const navigate = useNavigate(); function handleLogout() { DataStorage.set('isLoggedIn','false'); DataStorage.remove('accessToken'); DataStorage.remove('role'); DataStorage.remove('username'); DataStorage.remove('cart'); DataStorage.remove('expiryDate'); navigate('/'); } let username = DataStorage.get('username'); let isLoggedIn = DataStorage.get('isLoggedIn'); let userContent; if (isLoggedIn === 'true') { userContent = <> } else { userContent = <> {' '} } return ( {' '} CATS-Shop {userContent} ) }