Last active
June 14, 2020 17:17
-
-
Save whisher/3eeb0eb76401f32dd032f3c55654e39f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const authLoginEffects = (data: AuthLoginFormData) => ( | |
dispatch: ThunkDispatch<{}, {}, AnyAction> | |
) => { | |
AuthService.login(data) | |
.then((data) => { | |
dispatch(authLoginSuccess(data)); | |
Storage.local.set("auth", data); | |
push('/users') | |
}) | |
.catch((_) => { | |
dispatch(authLoginFailure()); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment