From 6b01fffd46cf11621525c044e38a75fe5f3e31b2 Mon Sep 17 00:00:00 2001 From: Vinit khandal <111434418+vinit717@users.noreply.github.com> Date: Thu, 1 Aug 2024 00:37:20 +0530 Subject: [PATCH] Fix mutiple api calls for user urls api (#128) * fix: mutiple api calls for user urls api * remove retry from useGetUrlsQuery * add refetch func to query client * fix: export of query client --- src/pages/_app.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 38d26d6..757267a 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -11,7 +11,14 @@ interface MyAppProps { pageProps: AppProps; } -export const queryClient = new QueryClient({ defaultOptions: { queries: { retry: 3 } } }); +export const queryClient = new QueryClient({ + defaultOptions: { + queries: { + retry: 3, + refetchOnWindowFocus: false, + }, + }, +}); export default function MyApp({ Component, pageProps }: MyAppProps) { return (