Skip to content

Commit

Permalink
fix sentry warning
Browse files Browse the repository at this point in the history
  • Loading branch information
denniske committed Nov 11, 2024
1 parent bedc4c5 commit 14f64cd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/src/app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ import ChangelogSnackbar from '@app/view/components/snackbar/changelog-snackbar'
import ErrorSnackbar from '@app/view/components/snackbar/error-snackbar';
import { createStackNavigator } from '@react-navigation/stack';

initSentry();

console.error = (function (error) {
return function (message) {
if (!/findDOMNode is deprecated/.test(message)) {
Expand All @@ -85,8 +87,6 @@ const queryClient = new QueryClient({

SplashScreen.preventAutoHideAsync();

initSentry();

try {
Notifications.setNotificationHandler({
handleNotification: async () => ({
Expand Down
3 changes: 2 additions & 1 deletion app/src/helper/sentry.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import * as Sentry from '@sentry/react-native';
import { appConfig } from '@nex/dataset';
import { Platform } from 'react-native';

export default function initSentry() {
Sentry.init({
dsn: appConfig.sentry.dsn,
debug: false,
enabled: !__DEV__,
enabled: !__DEV__ && Platform.OS !== 'web',

// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
Expand Down
4 changes: 0 additions & 4 deletions app/src/helper/sentry.web.ts

This file was deleted.

0 comments on commit 14f64cd

Please sign in to comment.