fix: disable retry on mount by default

This commit is contained in:
Ali BARIN
2024-04-08 15:20:10 +00:00
parent 855ec53dc2
commit f0bd2f335b
2 changed files with 2 additions and 1 deletions

View File

@@ -4,12 +4,12 @@ import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import api from 'helpers/api.js';
import useAuthentication from 'hooks/useAuthentication.js';
const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 1000,
retryOnMount: false,
refetchOnWindowFocus: false,
// provides a convenient default while it should be overridden for other HTTP methods
queryFn: async ({ queryKey, signal }) => {

View File

@@ -8,6 +8,7 @@ export default function useAutomatischConfig() {
const { data } = await api.get(`/v1/automatisch/config`, {
signal,
});
return data;
},
});