File size: 469 Bytes
4304c6d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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