Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- submit = () => {
- const selections = { ...this.state };
- delete selections.errors;
- delete selections.passwords_match;
- const validationResult = this.validate(selections, loginInfoRules);
- if(validationResult === null){
- this.props.setSelection({
- 'login-registration-step': selections
- });
- this.setBreadcrump();
- this.props.nextStep();
- } else{
- this.addErrors(validationResult.details);
- }
- }
- axios.post('/login', formattedData)
- .then(response => {
- registrationSuccess();
- // registrationError();
- nextStep();
- })
- .catch(err => {
- // registrationSuccess();
- registrationError();
- nextStep();
- });
Add Comment
Please, Sign In to add comment