Merge pull request #1797 from automatisch/disable-retry-on-mount

fix: disable retry on mount by default
This commit is contained in:
Ali BARIN
2024-04-09 14:31:57 +02:00
committed by GitHub
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;
},
});