fix topt (#75)
This commit is contained in:
parent
d8d4bee3f5
commit
8bd7459e12
|
@ -62,21 +62,22 @@ class LoginView extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
renderTOTP = () => {
|
renderTOTP = () => {
|
||||||
if (this.props.login.errorMessage && this.props.login.errorMessage.error === 'totp-required') {
|
if (!this.props.login.failure || this.props.login.error.error !== 'totp-required') {
|
||||||
return (
|
return null;
|
||||||
<TextInput
|
|
||||||
ref={ref => this.codeInput = ref}
|
|
||||||
style={styles.input}
|
|
||||||
onChangeText={code => this.setState({ code })}
|
|
||||||
keyboardType='numeric'
|
|
||||||
autoCorrect={false}
|
|
||||||
returnKeyType='done'
|
|
||||||
autoCapitalize='none'
|
|
||||||
onSubmitEditing={this.submit}
|
|
||||||
placeholder='Code'
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
return (
|
||||||
|
<TextInput
|
||||||
|
ref={ref => 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 && <Text> LOGANDO</Text>}
|
// {this.props.login.isFetching && <Text> LOGANDO</Text>}
|
||||||
|
@ -140,7 +141,6 @@ class LoginView extends React.Component {
|
||||||
<Text style={styles.link} onPress={this.privacyPolicy}> Privacy Policy</Text>
|
<Text style={styles.link} onPress={this.privacyPolicy}> Privacy Policy</Text>
|
||||||
</Text>
|
</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|
||||||
{this.props.login.failure && <Text style={styles.error}>{this.props.login.error.reason}</Text>}
|
{this.props.login.failure && <Text style={styles.error}>{this.props.login.error.reason}</Text>}
|
||||||
</View>
|
</View>
|
||||||
</SafeAreaView>
|
</SafeAreaView>
|
||||||
|
|
Loading…
Reference in New Issue