Forced Reset Password base functionality, disabled buttons in Forgot Password when loading

This commit is contained in:
Andrew14o
2021-10-27 17:02:42 -07:00
parent ccf513d9da
commit 5d27b09262
5 changed files with 130 additions and 10 deletions

View File

@@ -17,6 +17,9 @@ export default class ForgotPassword extends Component {
<View style={pageItemStyle.container}>
<Text>Forgot Password</Text>
</View>
<View style={pageItemStyle.container}>
<ActivityIndicator size="large" animating={this.state.loading} />
</View>
<View style={pageItemStyle.container}>
<TextInput
style={pageItemStyle.inputText}
@@ -31,19 +34,15 @@ export default class ForgotPassword extends Component {
onSubmitEditing={() => {this.state.email && this.onSubmit}}
/>
</View>
<View style={pageItemStyle.container}>
<ActivityIndicator size="large" animating={this.state.loading} />
</View>
{this.state.loading ||
<View style={pageItemStyle.containerButton}>
<Button title={strings.buttons.sendEmail}
onPress={this.onSubmit}
disabled={!this.state.email}
/>
disabled={this.state.loading || !this.state.email} />
</View>
}
<View style={pageItemStyle.containerButton}>
<Button title={strings.buttons.signIn} onPress={this.backToSignin} />
<Button title={strings.buttons.signIn}
onPress={this.backToSignin}
disabled={this.state.loading} />
</View>
</View>
);