-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
51 lines (46 loc) · 1.6 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import React, { useEffect } from "react";
import { Provider } from "react-redux";
import { Platform } from "react-native";
import * as Sentry from "@sentry/react-native";
import { extendTheme, NativeBaseProvider } from "native-base";
import { CODEPUSH_PROD_ANDROID, CODEPUSH_PROD_IOS, SENTRY_DSN } from "@env";
import { ActionSheetProvider } from "@expo/react-native-action-sheet";
import { NavigationContainer } from "@react-navigation/native";
import codePush from "react-native-code-push";
import Routes from "./src/screen/Routes";
import store from "./src/redux/store";
const theme = extendTheme({
fonts: {
heading: "GowunBatang-Bold",
body: "GowunBatang-Regular",
},
});
const App = () => {
Sentry.init({
dsn: SENTRY_DSN,
// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
tracesSampleRate: 1.0,
});
useEffect(() => {
codePush.sync({
deploymentKey:
Platform.OS === "android"
? CODEPUSH_PROD_ANDROID
: CODEPUSH_PROD_IOS,
installMode: codePush.InstallMode.IMMEDIATE,
});
}, []);
return (
<NativeBaseProvider theme={theme}>
<NavigationContainer>
<ActionSheetProvider>
<Provider store={store}>
<Routes />
</Provider>
</ActionSheetProvider>
</NavigationContainer>
</NativeBaseProvider>
);
};
export default Sentry.wrap(App);