Perf: i18n ns (#1441)

* i18n

* fix: handle
This commit is contained in:
Archer
2024-05-10 18:41:41 +08:00
committed by GitHub
parent f351d4ea68
commit 26f4c92124
27 changed files with 1705 additions and 1595 deletions

View File

@@ -6,6 +6,7 @@ import { appWithTranslation } from 'next-i18next';
import QueryClientContext from '@/web/context/QueryClient';
import ChakraUIContext from '@/web/context/ChakraUI';
import I18nContextProvider from '@/web/context/I18n';
import { useInitApp } from '@/web/context/useInitApp';
import '@/web/styles/reset.scss';
@@ -34,11 +35,13 @@ function App({ Component, pageProps }: AppProps) {
{scripts?.map((item, i) => <Script key={i} strategy="lazyOnload" {...item}></Script>)}
<QueryClientContext>
<ChakraUIContext>
<Layout>
<Component {...pageProps} />
</Layout>
</ChakraUIContext>
<I18nContextProvider>
<ChakraUIContext>
<Layout>
<Component {...pageProps} />
</Layout>
</ChakraUIContext>
</I18nContextProvider>
</QueryClientContext>
</>
);