-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
55 lines (49 loc) · 1.68 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
import { StatusBar as ExpoStatusBar } from 'expo-status-bar';
import React from 'react';
import { ThemeProvider } from 'styled-components/native';
import {
useFonts as useOswald,
Oswald_400Regular,
} from '@expo-google-fonts/oswald';
import * as firebase from 'firebase';
import { useFonts as useLato, Lato_400Regular } from '@expo-google-fonts/lato';
import { theme } from './src/infrastructure/theme';
import { Navigation } from './src/infrastructure/navigation';
import { useState } from 'react';
import { useEffect } from 'react';
import logError from 'react-native/Libraries/Utilities/logError';
import { AuthContextProvider } from './src/services/auth/auth.context';
const firebaseConfig = {
apiKey: 'AIzaSyDwvbfbarxCahQNS3mwHYWeSB9zaTJR4x4',
authDomain: 'fxfood-e60e9.firebaseapp.com',
projectId: 'fxfood-e60e9',
storageBucket: 'fxfood-e60e9.appspot.com',
messagingSenderId: '426172820523',
appId: '1:426172820523:web:c8df641e07f4c197270e6e',
};
if (!firebase.apps.length) {
firebase.initializeApp(firebaseConfig);
}
export default function App() {
const [isAuthenticated, setIsAuthenticated] = useState(false);
const [oswaldLoaded] = useOswald({
Oswald_400Regular,
});
const [latoLoaded] = useLato({
Lato_400Regular,
});
return (
<>
{oswaldLoaded && latoLoaded && (
<>
<ThemeProvider theme={theme}>
<AuthContextProvider>
<Navigation />
</AuthContextProvider>
</ThemeProvider>
<ExpoStatusBar style="auto" />
</>
)}
</>
);
}