show Continue if an email is already set upon return (#347)

This commit is contained in:
Akinwale Ariwodola 2018-10-28 22:43:48 +01:00 committed by GitHub
parent 6b746bc0b3
commit e75b0e51d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -152,6 +152,13 @@ class FirstRunScreen extends React.PureComponent {
}
}
onEmailViewLayout = () => {
this.setState({ showBottomContainer: true });
AsyncStorage.getItem('firstRunEmail').then(email => {
this.setState({ showSkip: !email || email.trim().length === 0 });
});
}
render() {
const {
authenticating,
@ -171,7 +178,7 @@ class FirstRunScreen extends React.PureComponent {
authToken={authToken}
generateAuthToken={generateAuthToken}
onEmailChanged={this.onEmailChanged}
onEmailViewLayout={() => this.setState({ showBottomContainer: true, showSkip: true })} />);
onEmailViewLayout={this.onEmailViewLayout} />);
}
return (