-
Notifications
You must be signed in to change notification settings - Fork 6
/
App.js
37 lines (32 loc) · 1.15 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
/* eslint-disable-file */
import "react-native-gesture-handler";
import { AlertContextProvider } from "@context/alert.context";
import { UserContextProvider } from "@context/auth.context";
import { OfflineContextProvider } from "@context/offline.context";
import MainNavigation from "@impacto-design-system/MainNavigation";
import useCachedResources from "@modules/cached-resources/useCachedResources";
import { theme } from "@modules/theme";
import { NavigationContainer } from "@react-navigation/native";
import React from "react";
import { Provider as PaperProvider } from "react-native-paper";
import { initialize } from "./services/parse/auth";
initialize();
export default function App() {
const isLoadingComplete = useCachedResources();
if (!isLoadingComplete) {
return null;
}
return (
<NavigationContainer independent>
<PaperProvider theme={theme}>
<AlertContextProvider>
<UserContextProvider>
<OfflineContextProvider>
<MainNavigation />
</OfflineContextProvider>
</UserContextProvider>
</AlertContextProvider>
</PaperProvider>
</NavigationContainer>
);
}