import { QueryClientProvider, QueryClient } from '@tanstack/react-query'
import { Provider } from 'react-redux';
import store from './store/store'
import AppRouters from './AppRouters';

import './App.css';


const queryClient = new QueryClient({
  defaultOptions: {
    queries: {
      refetchOnWindowFocus: false,
      retry: 3,
      // refetchOnMount: false,
      staleTime: 10*60*1000 // can also be a number in millisecond
    },
  },
})

function App() {
  return (
    <QueryClientProvider client={queryClient}>
      <Provider store={store}>
        <AppRouters />
      </Provider>
    </QueryClientProvider>
  );
}

export default App;
