Skip to content

Commit

Permalink
added jotai provider
Browse files Browse the repository at this point in the history
  • Loading branch information
sangdth committed Sep 13, 2023
1 parent 0469dd2 commit 308d2a2
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions components/client/Providers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { CacheProvider } from '@chakra-ui/next-js';
import { SessionProvider } from 'next-auth/react';
import { Provider as JotaiProvider } from 'jotai';
import { SWRConfig } from 'swr';

import { ChakraProvider } from '@/components/chakra';
Expand All @@ -12,14 +13,16 @@ export function Providers({ children }: { children: React.ReactNode }) {
return (
<SWRConfig value={configs}>
<SessionProvider>
<CacheProvider>
<ChakraProvider
theme={theme}
toastOptions={{ defaultOptions: toastOptions }}
>
{children}
</ChakraProvider>
</CacheProvider>
<JotaiProvider>
<CacheProvider>
<ChakraProvider
theme={theme}
toastOptions={{ defaultOptions: toastOptions }}
>
{children}
</ChakraProvider>
</CacheProvider>
</JotaiProvider>
</SessionProvider>
</SWRConfig>
);
Expand Down

0 comments on commit 308d2a2

Please sign in to comment.