import './Header.css';
import '../App.css';
import {Axios, logOut, sleep} from '../services/PhpApi'
import { toast, Toaster } from 'react-hot-toast';


function Header() 
{
    const logOutForm = () =>
    {
        logOut();
        toast.success("logged out!");
    
        sleep(1000);
        window.location.href = '/dog/';
    }
        
    return (
    <div className='logout'>
        <Toaster toastOptions={{ position: "top-center" }} />
        <div className='noprint'>Header</div>
        <button onClick={logOutForm}>Logout</button>
    </div>
  );
}

export default Header;