Просмотр исходного кода

fix request scope state management

Yuki Takei 7 месяцев назад
Родитель
Сommit
2be4699a92
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      apps/app/src/pages/_app.page.tsx

+ 4 - 1
apps/app/src/pages/_app.page.tsx

@@ -2,6 +2,7 @@ import type { ReactNode, JSX } from 'react';
 import React, { useEffect } from 'react';
 
 import type { Locale } from '@growi/core/dist/interfaces';
+import { Provider } from 'jotai';
 import type { NextPage } from 'next';
 import { appWithTranslation } from 'next-i18next';
 import type { AppContext, AppProps } from 'next/app';
@@ -72,7 +73,9 @@ function GrowiApp({ Component, pageProps, userLocale }: GrowiAppProps): JSX.Elem
     <>
       <GlobalFonts />
       <SWRConfig value={swrGlobalConfiguration}>
-        {getLayout(<Component {...pageProps} />)}
+        <Provider>
+          {getLayout(<Component {...pageProps} />)}
+        </Provider>
       </SWRConfig>
     </>
   );