-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
58 lines (55 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
51
52
53
54
55
56
57
58
import React, { useState, useEffect, useContext } from "react";
import {
useFonts,
Comfortaa_400Regular,
Comfortaa_500Medium,
Comfortaa_600SemiBold,
Comfortaa_700Bold,
} from "@expo-google-fonts/comfortaa";
import {
Montserrat_400Regular,
Montserrat_700Bold,
Montserrat_800ExtraBold,
Montserrat_500Medium,
Montserrat_600SemiBold,
} from "@expo-google-fonts/montserrat";
import LoadScreen from "./app/screens/LoadScreen";
import RootNav from "./app/navigation/RootNav";
import { SafeAreaView } from "react-navigation";
import { LogBox } from "react-native";
import GlobalState from "./app/contexts/GlobalState";
import tickets from "./app/data/ticket1.json";
import users from "./app/data/user1.json";
export default function App() {
const [Gstate, setGstate] = useState({
tickets: tickets,
users: users,
activeId: 0,
isLoggedIn: false,
});
LogBox.ignoreLogs([
"Your project is accessing the following APIs from a deprecated global rather than a module import: Constants (expo-constants).",
]);
const [fontsLoaded] = useFonts({
IcoMoon: require("./app/assets/icomoon/icomoon.ttf"),
Comfortaa_400Regular,
Comfortaa_500Medium,
Comfortaa_600SemiBold,
Comfortaa_700Bold,
Montserrat_400Regular,
Montserrat_700Bold,
Montserrat_800ExtraBold,
Montserrat_500Medium,
Montserrat_600SemiBold,
});
if (!fontsLoaded) {
return <LoadScreen />;
}
return (
<SafeAreaView style={{ flex: 1 }}>
<GlobalState.Provider value={[Gstate, setGstate]}>
<RootNav />
</GlobalState.Provider>
</SafeAreaView>
);
}