I have a redux actions for sessiontimeout and logout. When Sessiontimeout called, Internally calling the logout function.
It did not work also SESSIONTIMEOUT action type not dispatched.
How I suppose to call logout in Sessiontimeout and dispatch both SESSIONTIMEOUT and LOGOUT
export function sessionTimeOut(){
return (dispatch) => {
dispatch({
type: ACTIONTYPES.SESSIONTIMEOUT
})
}
logout()
}
export function logout(){
history.push('/')
return {
type: ACTIONTYPES.LOGOUT
}
}