Move location of token check earlier
This commit is contained in:
parent
a11aae98e9
commit
974277bbf6
1 changed files with 7 additions and 8 deletions
|
@ -163,14 +163,6 @@ export default class Login extends React.Component {
|
||||||
|
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
BackAndroid.addEventListener('hardwareBackPress', () => { return true; }); // Disable back button
|
BackAndroid.addEventListener('hardwareBackPress', () => { return true; }); // Disable back button
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
Animated.spring(this.animate, {
|
|
||||||
toValue: 0,
|
|
||||||
tension: 30,
|
|
||||||
}).start();
|
|
||||||
|
|
||||||
token.get().then(function (CIToken) {
|
token.get().then(function (CIToken) {
|
||||||
if (!CIToken) {
|
if (!CIToken) {
|
||||||
return;
|
return;
|
||||||
|
@ -181,6 +173,13 @@ export default class Login extends React.Component {
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
Animated.spring(this.animate, {
|
||||||
|
toValue: 0,
|
||||||
|
tension: 30,
|
||||||
|
}).start();
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
|
|
Reference in a new issue