import React from 'react'
import ReactDOM from 'react-dom/client'
import App from '@/app'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'

import { ThemeProvider } from '@/components/theme-provider'

const queryClient = new QueryClient()

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
    <React.StrictMode>
        <QueryClientProvider client={queryClient}>
            <ThemeProvider defaultTheme="dark" storageKey="nordic-flow-theme">
                <App />
            </ThemeProvider>
        </QueryClientProvider>
    </React.StrictMode>
)
