-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
47 lines (41 loc) · 1.36 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 { StatusBar as ExpoStatusBar } from 'expo-status-bar';
import AppLoading from 'expo-app-loading';
import React from 'react';
import { ThemeProvider } from 'styled-components/native';
import * as firebase from 'firebase';
import { useFonts, Oswald_400Regular } from '@expo-google-fonts/oswald';
import { Lato_400Regular } from '@expo-google-fonts/lato';
import { theme } from './src/infrastructure/theme';
import { Navigation } from './src/infrastructure/navigation';
import { AuthenticationContextProvider } from './src/services/authentication/AuthenticationContext';
const firebaseConfig = {
apiKey: 'AIzaSyAMOQP9M0--a-l6JDPF5wIXxSHtTd58BLw',
authDomain: 'yummeals-e8d3d.firebaseapp.com',
projectId: 'yummeals-e8d3d',
storageBucket: 'yummeals-e8d3d.appspot.com',
messagingSenderId: '572941448591',
appId: '1:572941448591:web:9993d5c64e60e32232c7fa',
};
if (!firebase.apps.length) {
firebase.initializeApp(firebaseConfig);
}
export default function App() {
const [fontsLoaded] = useFonts({
Oswald_400Regular,
Lato_400Regular,
});
if (!fontsLoaded) {
return <AppLoading />;
} else {
return (
<>
<ThemeProvider theme={theme}>
<AuthenticationContextProvider>
<Navigation />
</AuthenticationContextProvider>
</ThemeProvider>
<ExpoStatusBar style="auto" />
</>
);
}
}