-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
50 lines (44 loc) · 1.58 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
import React from "react";
import { StatusBar as ExpoStatusBar } from "expo-status-bar";
import { ThemeProvider } from "styled-components/native";
import { theme } from "./src/infrastructure/theme";
import { getAuth } from "firebase/auth";
import { initializeApp } from "firebase/app";
import { AuthenticationContextProvider } from "./src/services/authentication/authentication.context";
import { Navigation } from "./src/infrastructure/navigation";
import {
useFonts as useOswald,
Oswald_400Regular,
} from "@expo-google-fonts/oswald";
import { useFonts as useLato, Lato_400Regular } from "@expo-google-fonts/lato";
import { SafeArea } from "./src/components/utility/safe-area.component";
const firebaseConfig = {
apiKey: "AIzaSyBm9rrX06_S3fVCXkljJODVIhnNIqJK_ug",
authDomain: "mealstogo-e36ed.firebaseapp.com",
projectId: "mealstogo-e36ed",
storageBucket: "mealstogo-e36ed.appspot.com",
messagingSenderId: "106827352730",
appId: "1:106827352730:web:5503d857bf630b8ddeed23",
};
// if (!firebase.apps.length) {
// firebase.initializeApp(firebaseConfig);
// }
const firebaseApp = initializeApp(firebaseConfig);
export const auth = getAuth(firebaseApp);
export default function App() {
const [oswaldLoaded] = useOswald({ Oswald_400Regular });
const [latoLoaded] = useLato({ Lato_400Regular });
if (!oswaldLoaded || !latoLoaded) {
return null;
}
return (
<>
<ThemeProvider theme={theme}>
<AuthenticationContextProvider>
<Navigation />
</AuthenticationContextProvider>
</ThemeProvider>
<ExpoStatusBar style="auto" />
</>
);
}