Move location of token check earlier

This commit is contained in:
Jake Howard 2016-03-12 15:59:21 +00:00
parent a11aae98e9
commit 974277bbf6

View file

@ -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}>