diff --git a/src/common/pages/Otp/index.js b/src/common/pages/Otp/index.js
index 193a460..9329a15 100644
--- a/src/common/pages/Otp/index.js
+++ b/src/common/pages/Otp/index.js
@@ -60,7 +60,10 @@ class OtpPage extends React.Component{
};
resendCode = () => {
-
+ this.setState({isResending:true});
+ setTimeout(()=>{
+ this.setState({isResending:false});
+ },3000);
}
login = () => {
@@ -89,6 +92,15 @@ class OtpPage extends React.Component{
const { classes } = this.props;
return (
+
this.setState({isResending:false})}
+ ContentProps={{
+ 'aria-describedby': 'message-id',
+ }}
+ message={OTP Code Re-sended}
+ />
@@ -112,7 +124,7 @@ class OtpPage extends React.Component{
Input Your OTP Code
- Still not received OTP Code? Resend Code
+ Still not received OTP Code? this.resendCode()}>Resend Code
{[0, 1, 2, 3, 4, 5].map(x => (
diff --git a/src/common/stores/authenticaton.js b/src/common/stores/authenticaton.js
index c89120f..2bd8acb 100644
--- a/src/common/stores/authenticaton.js
+++ b/src/common/stores/authenticaton.js
@@ -1,5 +1,6 @@
import { observable, action, computed} from 'mobx';
import * as fetch from 'isomorphic-fetch';
+import { resolve } from 'url';
export class Authentication {
@@ -8,7 +9,7 @@ export class Authentication {
@observable isLoggingIn = false;
@observable isInviting = false;
@observable removingUser = false;
-
+ @observable isNeedEmailVerification = false;
@observable userWallet = {};
@observable userProfile = {
email : '',
@@ -50,8 +51,10 @@ export class Authentication {
return this.http.post("authentication/login", data)
.then(res => {
this.isLoggingIn = false;
+ this.isNeedEmailVerification = res.need_email_verification;
this.context.setToken(res.token);
this.context.loadDataAfterLogin();
+ return res;
})
.catch(err => {
this.isLoggingIn = false;