From 8f64cecad484e47c0d52a363d1f965b30e485490 Mon Sep 17 00:00:00 2001 From: Pramod S <87521752+pramodcog@users.noreply.github.com> Date: Wed, 18 Sep 2024 16:29:35 +0200 Subject: [PATCH] configured queryClient to disable refetch on window focus (#4764) --- .../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 <>;