import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { createRoot } from 'react-dom/client'
import { HelmetProvider } from 'react-helmet-async'

import '@/index.css'
import App from '@/App'

const helmetContext = { }

const client = new QueryClient ({
    defaultOptions: {
	queries: { staleTime: 5 * 60 * 1000,
		   gcTime:    30 * 60 * 1000,
		   retry:     1 }}})

createRoot (document.getElementById ('root')!).render (
    <HelmetProvider context={helmetContext}>
      <QueryClientProvider client={client}>
	<App/>
      </QueryClientProvider>
    </HelmetProvider>)
