From 32c1c4956f2be4b007b00915c427066aec30aaeb Mon Sep 17 00:00:00 2001 From: Pramod S Date: Wed, 18 Sep 2024 16:18:47 +0200 Subject: [PATCH] configured queryClient to disable refetch on window focus --- .../src/components/RevealContext/RevealContext.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/react-components/src/components/RevealContext/RevealContext.tsx b/react-components/src/components/RevealContext/RevealContext.tsx index 4733eac8f9e..f705ea6cc6d 100644 --- a/react-components/src/components/RevealContext/RevealContext.tsx +++ b/react-components/src/components/RevealContext/RevealContext.tsx @@ -44,7 +44,13 @@ export const RevealContext = (props: RevealContextProps): ReactElement => { const viewer = useRevealFromKeepAlive(props); const queryClient = useMemo(() => { - return new QueryClient(); + return new QueryClient({ + defaultOptions: { + queries: { + refetchOnWindowFocus: false + } + } + }); }, []); if (viewer === null) return <>;