mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 06:23:06 +08:00
9b682c8af5
* replace next with vite * disable strictmode (it interferes with collaboration in dev mode)
20 lines
439 B
TypeScript
20 lines
439 B
TypeScript
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
import React from 'react';
|
|
|
|
const queryClient = new QueryClient({
|
|
defaultOptions: {
|
|
queries: {
|
|
refetchOnMount: false,
|
|
refetchOnWindowFocus: false,
|
|
},
|
|
},
|
|
});
|
|
|
|
export function TanstackProvider({ children }: React.PropsWithChildren) {
|
|
return (
|
|
<QueryClientProvider client={queryClient}>
|
|
{children}
|
|
</QueryClientProvider>
|
|
);
|
|
}
|