forked from hikmahealth/hikma-health-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.tsx
More file actions
33 lines (28 loc) · 1.24 KB
/
index.tsx
File metadata and controls
33 lines (28 loc) · 1.24 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
import "@expo/metro-runtime" // this is for fast refresh on web w/o expo-router
import { LogBox } from "react-native"
import { registerRootComponent } from "expo"
import * as Sentry from "@sentry/react-native"
import { LaunchArguments } from "react-native-launch-arguments"
import { App } from "@/app"
if (LaunchArguments.value().isE2E) {
LogBox.ignoreAllLogs()
}
const sentryDsnDev = process.env.EXPO_PUBLIC_SENTRY_DSN_DEV
const sentryDsnProd = process.env.EXPO_PUBLIC_SENTRY_DSN
Sentry.init({
dsn: __DEV__ ? sentryDsnDev : sentryDsnProd,
// Set tracesSampleRate to 1.0 to capture 100% of transactions for tracing.
// We recommend adjusting this value in production.
tracesSampleRate: 1.0,
environment: __DEV__ ? "development" : "production",
// integrations: [captureConsoleIntegration({ levels: ["error"] })],
_experiments: {
// profilesSampleRate is relative to tracesSampleRate.
// Here, we'll capture profiles for 100% of transactions.
profilesSampleRate: 1.0,
},
})
// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
// It also ensures that whether you load the app in Expo Go or in a native build,
// the environment is set up appropriately
registerRootComponent(__DEV__ ? App : Sentry.wrap(App))