-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroot.tsx
More file actions
57 lines (49 loc) · 1.69 KB
/
root.tsx
File metadata and controls
57 lines (49 loc) · 1.69 KB
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
import React from "react";
import { LogBox } from "react-native";
import codePush from "react-native-code-push";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import { SafeAreaProvider } from "react-native-safe-area-context";
import { GoogleSignin } from "@react-native-google-signin/google-signin";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { AuthProvider } from "contexts/auth";
import { LoadingProvider } from "contexts/loading";
import { ThemeProvider } from "contexts/theme";
import { ENV } from "./env";
import { App } from "./src";
LogBox.ignoreLogs([
"None of the callbacks in the gesture are worklets.",
"Sending `onAnimatedValueUpdate` with no listeners registered.",
"[Reanimated] Tried to modify key `reduceMotion` of an object which has been already passed to a worklet.",
"[Reanimated] Reduced motion setting is enabled on this device.",
"Interceptor",
"Possible unhandled promise rejection",
]);
const queryClient = new QueryClient({
defaultOptions: {},
});
let Root = () => {
GoogleSignin.configure({
webClientId: ENV.googleClientId,
offlineAccess: true,
});
return (
<QueryClientProvider client={queryClient}>
<GestureHandlerRootView>
<SafeAreaProvider>
<ThemeProvider>
<LoadingProvider>
<AuthProvider>
<App />
</AuthProvider>
</LoadingProvider>
</ThemeProvider>
</SafeAreaProvider>
</GestureHandlerRootView>
</QueryClientProvider>
);
};
Root = codePush({
checkFrequency: codePush.CheckFrequency.ON_APP_START,
installMode: codePush.InstallMode.ON_NEXT_RESTART,
})(Root);
export { Root };