log out user

PHOTO EMBED

Thu Jul 29 2021 07:53:06 GMT+0000 (Coordinated Universal Time)

Saved by @davidTheNerdy #react.js

    const logout = useCallback(() =>{
        dispatch({type: 'LOGOUT'});
        setUser(null);
        window.location.reload();               //the old version is history.push('/'), this cause a error when user log in, refresh the page, log out, then SIGN IN button doesn't work, I have no idea why it happens 
    },[dispatch]) 
    
content_copyCOPY