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