import React from 'react'
import ReactDOM from 'react-dom/client'
import { BrowserRouter } from 'react-router-dom'
import App from './App.jsx'
import { AuthProvider } from './context/AuthContext.jsx'
import { CategoriesProvider } from './context/CategoriesContext.jsx'
import { CookieConsentProvider } from './context/CookieConsentContext.jsx'
import ScrollToTop from './routes/ScrollToTop.jsx'
import './index.css'

ReactDOM.createRoot(document.getElementById('root')).render(
  <React.StrictMode>
    <BrowserRouter>
      <ScrollToTop />
      <AuthProvider>
        <CategoriesProvider>
          <CookieConsentProvider>
            <App />
          </CookieConsentProvider>
        </CategoriesProvider>
      </AuthProvider>
    </BrowserRouter>
  </React.StrictMode>,
)
