import { IAuthState , LOGIN , REGISTER , LOGOUT , KEEP_LOGIN , IUserState , SET_LOADING , } from './types' ; export const login = ( authState ) => ( { type : LOGIN , payload : authState , } ) ; export const register = ( authState ) => ( { type : REGISTER , payload : authState , } ) ; export const logout = ( ) => ( { type : LOGOUT , } ) ; export const keepLogin = ( userState ) => ( { type : KEEP_LOGIN , payload : userState , } ) ; export const setLoading = ( loading ) => ( { type : SET_LOADING , payload : { loading } , } ) ;