import React from 'react';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
import ReactDOM from 'react-dom';
import 'react-toastify/dist/ReactToastify.css';

import 'modern-normalize/modern-normalize.css';
import './index.css';
import App from './App';
import { Load } from './components/reusableComponents/Loader/Loader'
import { store, persistor } from './redux/store';
import { QueryClient, QueryClientProvider } from 'react-query';

const queryClient = new QueryClient();


ReactDOM.render(
  <React.StrictMode>
    <PersistGate loading={<Load/>} persistor={persistor}>
      <Provider store={store}>
        <QueryClientProvider client={queryClient}>
          <App />
         </QueryClientProvider>
      </Provider>
    </PersistGate>
  </React.StrictMode>,
  document.getElementById('root'),
);
