added glitchtip using sentry sdk
This commit is contained in:
@@ -13,8 +13,16 @@ import CookieBanner from '@/components/consent/CookieBanner';
|
||||
import React from 'react';
|
||||
import { usePage } from '@inertiajs/react';
|
||||
import { useEffect } from 'react';
|
||||
import { Sentry, initSentry } from './lib/sentry';
|
||||
|
||||
const appName = import.meta.env.VITE_APP_NAME || 'Laravel';
|
||||
const InertiaFallback: React.FC = () => (
|
||||
<div className="flex min-h-screen items-center justify-center text-sm text-muted-foreground">
|
||||
Oberfläche konnte nicht geladen werden.
|
||||
</div>
|
||||
);
|
||||
|
||||
initSentry('inertia');
|
||||
|
||||
const LocaleSync: React.FC<{ children: React.ReactNode }> = ({ children }) => {
|
||||
// usePage is only available inside Inertia-provided tree; guard for SSR/raw mounts
|
||||
@@ -63,17 +71,19 @@ createInertiaApp({
|
||||
}
|
||||
|
||||
root.render(
|
||||
<AppearanceProvider>
|
||||
<ConsentProvider>
|
||||
<I18nextProvider i18n={i18n}>
|
||||
<LocaleSync>
|
||||
<App {...props} />
|
||||
</LocaleSync>
|
||||
<CookieBanner />
|
||||
<Toaster position="top-right" toastOptions={{ duration: 4000 }} />
|
||||
</I18nextProvider>
|
||||
</ConsentProvider>
|
||||
</AppearanceProvider>
|
||||
<Sentry.ErrorBoundary fallback={<InertiaFallback />}>
|
||||
<AppearanceProvider>
|
||||
<ConsentProvider>
|
||||
<I18nextProvider i18n={i18n}>
|
||||
<LocaleSync>
|
||||
<App {...props} />
|
||||
</LocaleSync>
|
||||
<CookieBanner />
|
||||
<Toaster position="top-right" toastOptions={{ duration: 4000 }} />
|
||||
</I18nextProvider>
|
||||
</ConsentProvider>
|
||||
</AppearanceProvider>
|
||||
</Sentry.ErrorBoundary>
|
||||
);
|
||||
},
|
||||
progress: {
|
||||
|
||||
Reference in New Issue
Block a user