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 c0d4659 commit 7bb3f7f
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions packages/app/provider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { ToastViewport } from './toast-viewport'
import { TRPCProvider } from './trpc'
import { Session } from 'app/utils/auth'
import { LuciaAuthProvider as AuthProvider } from './auth'
import { Provider as JotaiProvider } from 'jotai'

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

0 comments on commit 7bb3f7f

Please sign in to comment.