import jwt_decode from "jwt-decode";
import { useHistory } from "react-router";


const actionAuthLogin = jwt => ({type: 'LOGIN', jwt})
const actionAuthLogout = () =>  ({type: 'LOGOUT'})


const NewAuth = (jwt) => {
    return async dispatch => {
        dispatch(actionAuthLogin(jwt));
    }
}


export {actionAuthLogin, actionAuthLogout, NewAuth};