first relase
This commit is contained in:
parent
d3a42ba6e9
commit
c6afce22ed
288 changed files with 55505 additions and 192 deletions
20
components/i18n-server.tsx
Normal file
20
components/i18n-server.tsx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import { getLocaleOnServer } from '@/i18n-config/server';
|
||||
import React from 'react';
|
||||
import { ToastProvider } from './base/toast';
|
||||
import I18n from './i18n';
|
||||
|
||||
export type II18NServerProps = {
|
||||
children: React.ReactNode;
|
||||
};
|
||||
|
||||
const I18NServer = async ({ children }: II18NServerProps) => {
|
||||
const locale = await getLocaleOnServer();
|
||||
|
||||
return (
|
||||
<I18n {...{ locale }}>
|
||||
<ToastProvider>{children}</ToastProvider>
|
||||
</I18n>
|
||||
);
|
||||
};
|
||||
|
||||
export default I18NServer;
|
||||
Loading…
Add table
Add a link
Reference in a new issue