Skip to content

Instantly share code, notes, and snippets.

@whisher
Last active June 14, 2020 17:17

Revisions

  1. whisher revised this gist Jun 14, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@ export const authLoginEffects = (data: AuthLoginFormData) => (
    .then((data) => {
    dispatch(authLoginSuccess(data));
    Storage.local.set("auth", data);
    push('/users')
    dispatch(push("/user"));
    })
    .catch((_) => {
    dispatch(authLoginFailure());
  2. whisher created this gist Jun 14, 2020.
    13 changes: 13 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    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());
    });
    };