From 90e6f16e826323cf40b22e1941781391fc5a63a5 Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman Date: Tue, 18 Apr 2017 16:51:00 -0400 Subject: [PATCH] handle duplicate emails --- ui/js/component/auth.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/js/component/auth.js b/ui/js/component/auth.js index dbb7db239..a36c6d48d 100644 --- a/ui/js/component/auth.js +++ b/ui/js/component/auth.js @@ -61,7 +61,6 @@ const ConfirmEmailStage = React.createClass({ return { rewardType: null, code: '', - email: '', submitting: false, errorMessage: null, }; @@ -84,7 +83,7 @@ const ConfirmEmailStage = React.createClass({ this.setState({ submitting: false }); }.bind(this) - lbryio.call('user_email', 'confirm', {verification_token: this.state.code, email: this.state.email}, 'post').then((userEmail) => { + lbryio.call('user_email', 'confirm', {verification_token: this.state.code, email: this.props.email}, 'post').then((userEmail) => { if (userEmail.IsVerified) { this.props.onEmailConfirmed(); } else { @@ -206,7 +205,8 @@ export const AuthOverlay = React.createClass({ this.setState({ stage: "confirm", stageProps: { - onEmailConfirmed: function() { this.setState({ stage: "welcome", email: email }) }.bind(this) + email: email, + onEmailConfirmed: function() { this.setState({ stage: "welcome"}) }.bind(this) } }) }.bind(this)