Unfreeze registration form after error

This commit is contained in:
Alex Gleason 2020-04-29 20:00:01 -05:00
parent f6212cf81b
commit 44f196fa99
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 4 additions and 1 deletions

View file

@ -129,6 +129,7 @@ export function register(params) {
return dispatch(fetchMe());
}).catch(error => {
dispatch({ type: AUTH_REGISTER_FAIL, error });
throw error;
});
};
}

View file

@ -44,7 +44,9 @@ class RegistrationForm extends ImmutablePureComponent {
onSubmit = e => {
this.setState({ submissionLoading: true });
this.props.dispatch(register(this.state.params.toJS()));
this.props.dispatch(register(this.state.params.toJS())).catch(error => {
this.setState({ submissionLoading: false });
});
}
onFetchCaptcha = captcha => {