-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
56 lines (46 loc) · 1.41 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
48
49
50
51
52
53
54
55
56
import { StatusBar as ExpoStatusBar } from 'expo-status-bar';
import { ThemeProvider } from 'styled-components';
import { Provider as PaperProvider } from 'react-native-paper';
import {
useFonts as useOswald,
Oswald_400Regular,
} from '@expo-google-fonts/oswald';
import { useFonts as useLato, Lato_400Regular } from '@expo-google-fonts/lato';
import { theme } from './src/infrastructure/theme';
import { AuthenticationContextProvider } from './src/services/authentication/authentication.context';
import { Navigation } from './src/infrastructure/navigation';
import { initializeApp, getApps, getApp } from 'firebase/app';
const firebaseConfig = {
apiKey: 'AIzaSyBPgsQFVjF1RXhAfn-pGi2wNnAubKABwV0',
authDomain: 'foodelic-da72c.firebaseapp.com',
projectId: 'foodelic-da72c',
storageBucket: 'foodelic-da72c.appspot.com',
messagingSenderId: '371341229479',
appId: '1:371341229479:web:5b6f7d333a73ee1bff8a82',
};
if (!getApps.length) {
initializeApp(firebaseConfig);
}
export default function App() {
const [oswaldLoaded] = useOswald({
Oswald_400Regular,
});
const [latoLoaded] = useLato({
Lato_400Regular,
});
if (!oswaldLoaded || !latoLoaded) {
return null;
}
return (
<>
<ThemeProvider theme={theme}>
<PaperProvider>
<AuthenticationContextProvider>
<Navigation />
</AuthenticationContextProvider>
</PaperProvider>
</ThemeProvider>
<ExpoStatusBar style="auto" />
</>
);
}