-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
59 lines (53 loc) · 1.6 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
57
58
59
import React, { useState, useEffect } from "react";
import { colors } from "./src/Infrastructure/Theme/colors";
import { createTheming } from "@callstack/react-theme-provider";
import {
useFonts,
Oswald_400Regular,
Lato_400Regular,
Griffy_400Regular,
Tangerine_400Regular,
Arizonia_400Regular
} from "@expo-google-fonts/dev";
import FlashMessage from "react-native-flash-message";
import { AuthenticationContextProvider } from "./src/Services/Authentication/Authentication-context";
import { Navigation } from "./src/Infrastructure/Navigation/index";
const { ThemeProvider } = createTheming({ colors });
export default function App() {
// const [isAuthenticated, setIsAuthenticated] = useState(false);
// useEffect(() => {
// setTimeout(() => {
// signInWithEmailAndPassword(auth, "[email protected]", "password")
// .then((userCredentials) => {
// const user = userCredentials.user;
// console.log(user);
// setIsAuthenticated(true);
// })
// .catch((e) => {
// console.log("Error with authentication at App.js " + e);
// });
// }, 3000);
// }, []);
// if (!isAuthenticated) {
// return null;
// }
const [fontsLoaded] = useFonts({
Oswald_400Regular,
Lato_400Regular,
Griffy_400Regular,
Tangerine_400Regular,
Arizonia_400Regular
});
if (!fontsLoaded) {
return null;
} else {
return (
<ThemeProvider>
<AuthenticationContextProvider>
<Navigation />
<FlashMessage position="bottom" />
</AuthenticationContextProvider>
</ThemeProvider>
);
}
}