Created
June 8, 2017 06:02
-
-
Save lancetw/5ca3ae3c3f76b1a0fcfcbdca1142e256 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 submit = (values, dispatch /*, props */) => { | |
setSubmitting('loginForm', true) | |
return login(values) | |
.then(action => { | |
dispatch(action) | |
setSubmitting('loginForm', false) | |
}) | |
.catch(error => { | |
dispatch(error) | |
throw new SubmissionError(error.payload) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment