-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
31 lines (29 loc) · 987 Bytes
/
App.tsx
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
import "react-native-gesture-handler";
import "react-native-get-random-values";
import { SafeAreaProvider } from "react-native-safe-area-context";
import React from "react";
import Navigation from "./src/navigation";
import { useFonts } from "expo-font";
import AppLoading from "expo-app-loading";
import { GoalsContextProvider } from "./src/contexts/goals";
import { TasksContextProvider } from "./src/contexts/tasks";
export default function App() {
const [fontLoaded] = useFonts({
"Lexend-Bold": require("./assets/fonts/Lexend-Bold.ttf"),
"Lexend-SemiBold": require("./assets/fonts/Lexend-SemiBold.ttf"),
"Lexend-Regular": require("./assets/fonts/Lexend-Regular.ttf"),
});
if (!fontLoaded) {
return <AppLoading />;
} else {
return (
<GoalsContextProvider>
<TasksContextProvider>
<SafeAreaProvider>
<Navigation />
</SafeAreaProvider>
</TasksContextProvider>
</GoalsContextProvider>
);
}
}