Files
postshop-frontend/context/provider.tsx
Jelaletdin12 fdec9e4b0e first commit
2025-11-10 10:07:48 +05:00

20 lines
522 B
TypeScript

"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>
)
}