Add RootProviders to global-error.tsx
This commit is contained in:
@@ -10,6 +10,7 @@ import { Heading } from '@kit/ui/heading';
|
|||||||
import { Trans } from '@kit/ui/trans';
|
import { Trans } from '@kit/ui/trans';
|
||||||
|
|
||||||
import { SiteHeader } from '~/(marketing)/_components/site-header';
|
import { SiteHeader } from '~/(marketing)/_components/site-header';
|
||||||
|
import { RootProviders } from '~/components/root-providers';
|
||||||
|
|
||||||
const GlobalErrorPage = ({
|
const GlobalErrorPage = ({
|
||||||
error,
|
error,
|
||||||
@@ -23,6 +24,7 @@ const GlobalErrorPage = ({
|
|||||||
return (
|
return (
|
||||||
<html>
|
<html>
|
||||||
<body>
|
<body>
|
||||||
|
<RootProviders>
|
||||||
<div className={'flex h-screen flex-1 flex-col'}>
|
<div className={'flex h-screen flex-1 flex-col'}>
|
||||||
<SiteHeader />
|
<SiteHeader />
|
||||||
|
|
||||||
@@ -55,7 +57,7 @@ const GlobalErrorPage = ({
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div className={'flex space-x-4'}>
|
||||||
<Button
|
<Button
|
||||||
className={'w-full'}
|
className={'w-full'}
|
||||||
variant={'default'}
|
variant={'default'}
|
||||||
@@ -78,6 +80,7 @@ const GlobalErrorPage = ({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</RootProviders>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export function RootProviders({
|
|||||||
theme = appConfig.theme,
|
theme = appConfig.theme,
|
||||||
children,
|
children,
|
||||||
}: React.PropsWithChildren<{
|
}: React.PropsWithChildren<{
|
||||||
lang: string;
|
lang?: string;
|
||||||
theme?: string;
|
theme?: string;
|
||||||
}>) {
|
}>) {
|
||||||
const i18nSettings = useMemo(() => getI18nSettings(lang), [lang]);
|
const i18nSettings = useMemo(() => getI18nSettings(lang), [lang]);
|
||||||
|
|||||||
Reference in New Issue
Block a user