fix(i18n): restore missing translations and enable Suspense loading
This commit is contained in:
@@ -22,6 +22,12 @@ const InertiaFallback: React.FC = () => (
|
||||
</div>
|
||||
);
|
||||
|
||||
const LoadingFallback: React.FC = () => (
|
||||
<div className="flex min-h-screen items-center justify-center text-sm text-muted-foreground">
|
||||
Lade...
|
||||
</div>
|
||||
);
|
||||
|
||||
initSentry('inertia');
|
||||
|
||||
const LocaleSync: React.FC<{ children: React.ReactNode }> = ({ children }) => {
|
||||
@@ -75,11 +81,13 @@ createInertiaApp({
|
||||
<AppearanceProvider>
|
||||
<ConsentProvider>
|
||||
<I18nextProvider i18n={i18n}>
|
||||
<LocaleSync>
|
||||
<App {...props} />
|
||||
</LocaleSync>
|
||||
<CookieBanner />
|
||||
<Toaster position="top-right" toastOptions={{ duration: 4000 }} />
|
||||
<React.Suspense fallback={<LoadingFallback />}>
|
||||
<LocaleSync>
|
||||
<App {...props} />
|
||||
</LocaleSync>
|
||||
<CookieBanner />
|
||||
<Toaster position="top-right" toastOptions={{ duration: 4000 }} />
|
||||
</React.Suspense>
|
||||
</I18nextProvider>
|
||||
</ConsentProvider>
|
||||
</AppearanceProvider>
|
||||
|
||||
@@ -32,7 +32,7 @@ i18n
|
||||
loadPath: '/lang/{{lng}}/{{ns}}.json?v=20251222',
|
||||
},
|
||||
react: {
|
||||
useSuspense: false,
|
||||
useSuspense: true,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user