import { useAuth } from "../Auth" import { Link } from "react-router-dom"; import { toast } from "react-toastify"; import QuestionMarkIcon from '@heroicons/react/24/outline/QuestionMarkCircleIcon' import * as React from "react"; export default function NavBar({ appName, nameWidth = 200}: { appName: string, nameWidth?: number }) { const { isAuthenticated, user, logout, token } = useAuth(); const onLogout = () => { toast.promise( logout(), { success: { render() { return `Bye bye` }, // other options icon: "👋", }, error: { render( {data} ) { return `${data}` }, }, pending: 'logging out ..' }); } return ( <>