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() {
|
||||
BackAndroid.addEventListener('hardwareBackPress', () => { return true; }); // Disable back button
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
Animated.spring(this.animate, {
|
||||
toValue: 0,
|
||||
tension: 30,
|
||||
}).start();
|
||||
|
||||
token.get().then(function (CIToken) {
|
||||
if (!CIToken) {
|
||||
return;
|
||||
|
@ -181,6 +173,13 @@ export default class Login extends React.Component {
|
|||
}.bind(this));
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
Animated.spring(this.animate, {
|
||||
toValue: 0,
|
||||
tension: 30,
|
||||
}).start();
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
|
|
Reference in a new issue