-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
35 lines (28 loc) · 907 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
32
33
34
35
import { ApolloProvider } from "@apollo/client"
import { NavigationContainer } from "@react-navigation/native"
import Sentry from "@sentry/react-native"
import env from "react-native-config"
import React, { ComponentType } from "react"
import { StatusBar, useColorScheme } from "react-native"
import AppNavigator from "~navigation/AppNavigator"
import { client } from "~services/network"
const App = () => {
const isDarkMode = useColorScheme() === "dark"
return (
<ApolloProvider client={client}>
<NavigationContainer>
<StatusBar barStyle={isDarkMode ? "light-content" : "dark-content"} />
<AppNavigator />
</NavigationContainer>
</ApolloProvider>
)
}
let Entry: ComponentType = App
if (!__DEV__) {
Sentry.init({
dsn: env.SENTRY_DSN,
environment: env.IS_PRODUCTION ? "production" : "staging",
})
Entry = Sentry.wrap(App)
}
export default Entry