import { SET_LOGIN_STATE , RESET_LOGIN_STATE } from "./type" ; export const login = ( { displayName , username , token , } ) => ( dispatch ) => { return dispatch ( { type : SET_LOGIN_STATE , payload : { displayName , username , token , } , } ) ; } ; export const logout = ( ) => ( dispatch ) => { return dispatch ( { type : RESET_LOGIN_STATE , } ) ; } ;