-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
47 lines (42 loc) · 1.52 KB
/
App.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
45
46
47
import * as firebase from 'firebase';
import firebaseConfigKeys from './config';
import {createSwitchNavigator, createStackNavigator, createAppContainer} from 'react-navigation';
import AuthLoadingScreen from './screens/AuthLoadingScreen';
import SignInScreen from './screens/SignInScreen';
import SignOutScreen from './screens/SignOutScreen';
import HomeScreen from './screens/HomeScreen';
import PassScreen from './screens/PassScreen';
import PassLoadingScreen from './screens/PassLoadingScreen';
import VisitsScreen from './screens/VisitsScreen';
import PassBarcodeScreen from './screens/PassBarcodeScreen';
import VisitsLoadingScreen from './screens/VisitsLoadingScreen';
const firebaseConfig = {
apiKey: firebaseConfigKeys.apiKey,
authDomain: firebaseConfigKeys.authDomain,
databaseURL: firebaseConfigKeys.databaseURL,
projectId: firebaseConfigKeys.projectId,
storageBucket: firebaseConfigKeys.storageBucket,
messagingSenderId: firebaseConfigKeys.messagingSenderId,
appId: firebaseConfigKeys.appId
};
firebase.initializeApp(firebaseConfig);
const AppStack = createStackNavigator(
{
Home: HomeScreen,
Pass: PassScreen,
PassLoading: PassLoadingScreen,
PassBarcode: PassBarcodeScreen,
Visits: VisitsScreen,
VisitsLoading: VisitsLoadingScreen,
});
const AuthStack = createStackNavigator({
AuthLoading: AuthLoadingScreen,
SignIn: SignInScreen,
});
export default createAppContainer(createSwitchNavigator({
App: AppStack,
Auth: AuthStack,
SignOut: SignOutScreen,
},
{ initialRouteName: 'Auth',}
));