mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-03-03 14:42:49 +05:30
#311: fix newEmail always missed on the 3d step of change email form
This commit is contained in:
parent
1debe774ae
commit
863aa03547
@ -250,7 +250,7 @@ export default class ChangeEmail extends Component {
|
||||
}
|
||||
|
||||
renderStep2({form, code, isCodeSpecified, isActiveStep}) {
|
||||
const newEmail = this.props.stepForms[1].value('email');
|
||||
const {newEmail} = this.state;
|
||||
|
||||
return (
|
||||
<div className={styles.formBody}>
|
||||
@ -293,10 +293,16 @@ export default class ChangeEmail extends Component {
|
||||
nextStep() {
|
||||
const {activeStep} = this.state;
|
||||
const nextStep = activeStep + 1;
|
||||
let newEmail = null;
|
||||
|
||||
if (activeStep === 1) {
|
||||
newEmail = this.props.stepForms[1].value('email');
|
||||
}
|
||||
|
||||
if (nextStep < STEPS_TOTAL) {
|
||||
this.setState({
|
||||
activeStep: nextStep
|
||||
activeStep: nextStep,
|
||||
newEmail
|
||||
});
|
||||
|
||||
this.props.onChangeStep(nextStep);
|
||||
|
Loading…
x
Reference in New Issue
Block a user