From 8bd7459e1245b5e0973ad5366c3c235f093b2794 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Mon, 13 Nov 2017 19:51:56 -0200 Subject: [PATCH] fix topt (#75) --- app/views/LoginView.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/app/views/LoginView.js b/app/views/LoginView.js index 7df68ad1..9af008fb 100644 --- a/app/views/LoginView.js +++ b/app/views/LoginView.js @@ -62,21 +62,22 @@ class LoginView extends React.Component { } renderTOTP = () => { - if (this.props.login.errorMessage && this.props.login.errorMessage.error === 'totp-required') { - return ( - this.codeInput = ref} - style={styles.input} - onChangeText={code => this.setState({ code })} - keyboardType='numeric' - autoCorrect={false} - returnKeyType='done' - autoCapitalize='none' - onSubmitEditing={this.submit} - placeholder='Code' - /> - ); + if (!this.props.login.failure || this.props.login.error.error !== 'totp-required') { + return null; } + return ( + this.codeInput = ref} + style={styles.input_white} + onChangeText={code => this.setState({ code })} + keyboardType='numeric' + autoCorrect={false} + returnKeyType='done' + autoCapitalize='none' + onSubmitEditing={this.submit} + placeholder='Code' + /> + ); } // {this.props.login.isFetching && LOGANDO} @@ -140,7 +141,6 @@ class LoginView extends React.Component { Privacy Policy - {this.props.login.failure && {this.props.login.error.reason}}