import { useNavigate } from "react-router-dom"; import { apiUserLogout } from "src/api/AuthenticationApi"; import { useAuth } from "src/hooks/AuthHooks"; const settings = { Profile: "/profile", Account: "/account", }; export function NavBar() { const Navigate = useNavigate(); const { isAuthenticated, setIsAuthenticated } = useAuth(); const logout = () => { apiUserLogout(); setIsAuthenticated(false); Navigate("/"); }; return (
TurTask
{/*
*/} {isAuthenticated ? (
) : (
)}
); }