mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-09 02:46:52 +08:00
refact common layout (#490)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import I18nServer from './components/i18n-server'
|
||||
import SentryInitor from './components/sentry-initor'
|
||||
import { getLocaleOnServer } from '@/i18n/server'
|
||||
|
||||
import './styles/globals.css'
|
||||
@@ -14,6 +15,7 @@ const LocaleLayout = ({
|
||||
children: React.ReactNode
|
||||
}) => {
|
||||
const locale = getLocaleOnServer()
|
||||
|
||||
return (
|
||||
<html lang={locale ?? 'en'} className="h-full">
|
||||
<body
|
||||
@@ -23,8 +25,10 @@ const LocaleLayout = ({
|
||||
data-public-edition={process.env.NEXT_PUBLIC_EDITION}
|
||||
data-public-sentry-dsn={process.env.NEXT_PUBLIC_SENTRY_DSN}
|
||||
>
|
||||
{/* @ts-expect-error Async Server Component */}
|
||||
<I18nServer locale={locale}>{children}</I18nServer>
|
||||
<SentryInitor>
|
||||
{/* @ts-expect-error Async Server Component */}
|
||||
<I18nServer locale={locale}>{children}</I18nServer>
|
||||
</SentryInitor>
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user