-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.tsx
43 lines (38 loc) · 1.22 KB
/
App.tsx
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
// @flow
import { StatusBar } from 'expo-status-bar';
import React from 'react';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import useCachedResources from './hooks/useCachedResources';
import useColorScheme from './hooks/useColorScheme';
import Navigation from './navigation';
import firebase from 'firebase/app';
import "firebase/auth";
import "firebase/firestore";
var firebaseConfig = {
apiKey: "AIzaSyBIkzUAEQTEF6h4K8Ui_Z8mF6WeM1f1Ff4",
authDomain: "mavs-abroad-dda3b.firebaseapp.com",
databaseURL: "https://mavs-abroad-dda3b-default-rtdb.firebaseio.com",
projectId: "mavs-abroad-dda3b",
storageBucket: "mavs-abroad-dda3b.appspot.com",
messagingSenderId: "583288162608",
appId: "1:583288162608:web:e6cba5ee73bad917d7a0f5",
measurementId: "G-F8WJE0L2W1"
};
export default function App() {
if (!firebase.apps.length) {
console.log('Connected with Firebase')
firebase.initializeApp(firebaseConfig);
}
const isLoadingComplete = useCachedResources();
const colorScheme = useColorScheme();
if (!isLoadingComplete) {
return null;
} else {
return (
<SafeAreaProvider>
<Navigation colorScheme={colorScheme} />
<StatusBar />
</SafeAreaProvider>
);
}
}