Skip to content

Commit

Permalink
Add jotai provider for nextjs
Browse files Browse the repository at this point in the history
  • Loading branch information
rmarscher committed Jan 6, 2024
1 parent f701007 commit 8e8fbfe
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions packages/app/provider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { TamaguiProvider } from './tamagui'
import { TamaguiThemeProvider } from './theme'
import { ToastViewport } from './toast-viewport'
import { TRPCProvider } from './trpc'
import { Provider as JotaiProvider } from 'jotai'

export function Provider({
children,
Expand All @@ -16,20 +17,22 @@ export function Provider({
initialSession: Session | null
}) {
return (
<TamaguiThemeProvider>
<TamaguiProvider>
<SafeAreaProvider>
<SolitoImageProvider>
<ToastProvider swipeDirection='horizontal' duration={6000} native={['mobile']}>
<AuthProvider initialSession={initialSession}>
<TRPCProvider>{children}</TRPCProvider>
<CustomToast />
<ToastViewport />
</AuthProvider>
</ToastProvider>
</SolitoImageProvider>
</SafeAreaProvider>
</TamaguiProvider>
</TamaguiThemeProvider>
<JotaiProvider>
<TamaguiThemeProvider>
<TamaguiProvider>
<SafeAreaProvider>
<SolitoImageProvider>
<ToastProvider swipeDirection='horizontal' duration={6000} native={['mobile']}>
<AuthProvider initialSession={initialSession}>
<TRPCProvider>{children}</TRPCProvider>
<CustomToast />
<ToastViewport />
</AuthProvider>
</ToastProvider>
</SolitoImageProvider>
</SafeAreaProvider>
</TamaguiProvider>
</TamaguiThemeProvider>
</JotaiProvider>
)
}

0 comments on commit 8e8fbfe

Please sign in to comment.