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


function Header() 
{
    const logOutForm = () =>
    {
        logOut();
        toast.success("logged out!");
    
        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;