added glitchtip using sentry sdk

This commit is contained in:
Codex Agent
2025-12-19 10:13:30 +01:00
parent 53ec427e6e
commit 778ffc8bb9
13 changed files with 1574 additions and 58 deletions

View File

@@ -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: {