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() {
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}>