import React from 'react'
import ReactDOM from 'react-dom/client'
import { App } from './App'
import AppContext from './context/AppContext'

import './lib/superjson'
import './index.css'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { Provider } from 'jotai'

const queryClient = new QueryClient()

ReactDOM.createRoot(document.getElementById('app') as HTMLElement).render(
  <React.StrictMode>
    <Provider>
      <QueryClientProvider client={queryClient}>
        <AppContext>
          <App />
        </AppContext>
      </QueryClientProvider>
    </Provider>
  </React.StrictMode>,
)
