mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
23 lines
447 B
TypeScript
23 lines
447 B
TypeScript
import React from 'react'
|
|
import I18N from './i18n'
|
|
import { ToastProvider } from './base/toast'
|
|
import { getLocaleOnServer } from '@/i18n/server'
|
|
|
|
export type II18NServerProps = {
|
|
children: React.ReactNode
|
|
}
|
|
|
|
const I18NServer = async ({
|
|
children,
|
|
}: II18NServerProps) => {
|
|
const locale = getLocaleOnServer()
|
|
|
|
return (
|
|
<I18N {...{ locale }}>
|
|
<ToastProvider>{children}</ToastProvider>
|
|
</I18N>
|
|
)
|
|
}
|
|
|
|
export default I18NServer
|