-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.tsx
62 lines (51 loc) · 1.81 KB
/
index.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
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
60
61
62
import React from "react";
import { AppRegistry, StatusBar, Platform, LogBox } from "react-native";
import "react-native-gesture-handler";
import ReactNativeRecoilPersist, {
ReactNativeRecoilPersistGate,
} from "react-native-recoil-persist";
import { SafeAreaProvider } from "react-native-safe-area-context";
import { enableFreeze, enableScreens } from "react-native-screens";
import { GoogleSignin } from "@react-native-google-signin/google-signin";
import moment from "moment-timezone";
import { RecoilRoot } from "recoil";
import { AxiosProvider } from "@app/context/axios";
import { SplashProvider } from "@app/context/splash";
import { ThemeProvider } from "@app/context/theme";
import App from "@app/index";
import { log } from "@app/utils/logging";
import getEnvVars from "@root/environment";
import { name as appName } from "./app.json";
const { googleWebClientId } = getEnvVars();
moment.tz.setDefault("Asia/Seoul");
enableFreeze(true);
enableScreens(true);
LogBox.ignoreLogs([
"Sending `onAnimatedValueUpdate` with no listeners registered.",
]);
const Root = () => {
log("REND", "INIT");
StatusBar.setBarStyle("light-content");
Platform.OS === "android" && StatusBar.setBackgroundColor("transparent");
Platform.OS === "android" && StatusBar.setTranslucent(true);
GoogleSignin.configure({
webClientId: googleWebClientId,
offlineAccess: true,
});
return (
<RecoilRoot>
<SafeAreaProvider>
<ThemeProvider>
<ReactNativeRecoilPersistGate store={ReactNativeRecoilPersist}>
<AxiosProvider>
<SplashProvider>
<App />
</SplashProvider>
</AxiosProvider>
</ReactNativeRecoilPersistGate>
</ThemeProvider>
</SafeAreaProvider>
</RecoilRoot>
);
};
AppRegistry.registerComponent(appName, () => Root);