import React from 'react'
import ReactDOM from 'react-dom/client'
import { BrowserRouter, Routes, Route } from 'react-router-dom'
import { Layout } from '@components/layout'
import { HomePage, AboutPage, ComponentsShowcase, HealthPage } from '@pages'
import '@styles/index.css'

ReactDOM.createRoot(document.getElementById('root')).render(
  <React.StrictMode>
    <BrowserRouter>
      <Routes>
        <Route path="/" element={<Layout />}>
          <Route index element={<HomePage />} />
          <Route path="components" element={<ComponentsShowcase />} />
          <Route path="about" element={<AboutPage />} />
        </Route>
        <Route path="/health" element={<HealthPage />} />
      </Routes>
    </BrowserRouter>
  </React.StrictMode>,
)
