Merge branch 'dev' of https://git.jetbrains.space/nalpari/q-cast-iii/qcast-front into dev
This commit is contained in:
commit
13b57dae23
@ -2,15 +2,19 @@
|
|||||||
|
|
||||||
import { useCurrentLocale } from '@/locales/client'
|
import { useCurrentLocale } from '@/locales/client'
|
||||||
import { LocaleProvider } from './LocaleProvider'
|
import { LocaleProvider } from './LocaleProvider'
|
||||||
|
import ServerError from './error'
|
||||||
|
import { ErrorBoundary } from 'next/dist/client/components/error-boundary'
|
||||||
|
|
||||||
export default function LocaleLayout({ children }) {
|
export default function LocaleLayout({ children }) {
|
||||||
const locale = useCurrentLocale()
|
const locale = useCurrentLocale()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LocaleProvider locale={locale} fallback={''}>
|
<ErrorBoundary fallback={<ServerError />}>
|
||||||
{children}
|
<LocaleProvider locale={locale} fallback={<ServerError />}>
|
||||||
</LocaleProvider>
|
{children}
|
||||||
|
</LocaleProvider>
|
||||||
|
</ErrorBoundary>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user