first commit
This commit is contained in:
20
context/provider.tsx
Normal file
20
context/provider.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
"use client"
|
||||
|
||||
import { QueryClientProvider, HydrationBoundary } from "@tanstack/react-query"
|
||||
import { queryClient } from "@/lib/queryClient"
|
||||
import type { ReactNode } from "react"
|
||||
|
||||
interface ProvidersProps {
|
||||
children: ReactNode
|
||||
dehydratedState?: unknown
|
||||
}
|
||||
|
||||
export function Providers({ children, dehydratedState }: ProvidersProps) {
|
||||
return (
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<HydrationBoundary state={dehydratedState}>
|
||||
{children}
|
||||
</HydrationBoundary>
|
||||
</QueryClientProvider>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user