"use client"; import { QueryClientProvider as TanstackQueryClientProvider } from "@tanstack/react-query"; import { useMemo, type ReactNode } from "react"; import { makeQueryClient } from "@/lib/query-client"; /** * Client component boundary around the QueryClient so a fresh instance is * created per browser session (module-level singletons leak across SSR * requests in dev). Server state policy lives in lib/query-client.ts. * * The tanstack export is aliased (TASK-0100 S5): defining this wrapper with * the same name shadows it, so `` on the line below * self-referenced the wrapper (build error "defined multiple times" / would * be infinite recursion at runtime). */ export function QueryClientProvider({ children }: { children: ReactNode }) { const queryClient = useMemo(() => makeQueryClient(), []); return {children}; }