Add RootProviders to global-error.tsx

This commit is contained in:
gbuomprisco
2025-03-31 14:06:55 +08:00
parent 6a06d6ef8e
commit 7b1e261750
2 changed files with 47 additions and 44 deletions

View File

@@ -10,6 +10,7 @@ import { Heading } from '@kit/ui/heading';
import { Trans } from '@kit/ui/trans';
import { SiteHeader } from '~/(marketing)/_components/site-header';
import { RootProviders } from '~/components/root-providers';
const GlobalErrorPage = ({
error,
@@ -23,6 +24,7 @@ const GlobalErrorPage = ({
return (
<html>
<body>
<RootProviders>
<div className={'flex h-screen flex-1 flex-col'}>
<SiteHeader />
@@ -55,7 +57,7 @@ const GlobalErrorPage = ({
</p>
</div>
<div>
<div className={'flex space-x-4'}>
<Button
className={'w-full'}
variant={'default'}
@@ -78,6 +80,7 @@ const GlobalErrorPage = ({
</div>
</div>
</div>
</RootProviders>
</body>
</html>
);

View File

@@ -42,7 +42,7 @@ export function RootProviders({
theme = appConfig.theme,
children,
}: React.PropsWithChildren<{
lang: string;
lang?: string;
theme?: string;
}>) {
const i18nSettings = useMemo(() => getI18nSettings(lang), [lang]);