-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.android.js
44 lines (37 loc) · 870 Bytes
/
index.android.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import { Provider } from 'react-redux';
import { store } from './src/store/index.js';
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import Route from './src/components/routes.js'
import firebase from './src/firebase'
import { Actions } from 'react-native-router-flux';
export default class touristapp extends Component {
componentWillMount() {
firebase.auth().onAuthStateChanged(function (user) {
if (user) {
Actions.App()
} else {
// Stay at login screen
Actions.LogIn()
}
});
}
render() {
return (
<Provider store={store}>
<Route />
</Provider>
);
}
}
AppRegistry.registerComponent('touristapp', () => touristapp);