File size: 1,144 Bytes
47c0b4f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76197f0
 
47c0b4f
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import React from 'react'
import ReactDOM from 'react-dom/client'
import { Route, Routes, HashRouter } from 'react-router-dom'
import './index.css'
import { ThemeProvider } from './context/themeContext'
import { DeploymentGroupProvider } from './context/deploymentGroupContext'
import { ErrorProvider } from './context/errorContext'
import Appbar from './components/Appbar'
import Home from './pages/Home'
import Calculator from './pages/Calculator'
import NotFound from './pages/NotFound'

const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement)

root.render(
  <React.StrictMode>
    <ThemeProvider>
      <DeploymentGroupProvider>
        <ErrorProvider>
          <HashRouter>
            <Routes>
              <Route path='/' element={<Appbar />}>
                <Route index element={<Calculator />} />
                {/* <Route path='calculator' element={<Calculator />} /> */}
                <Route path='*' element={<NotFound />} />
              </Route>
            </Routes>
          </HashRouter>
        </ErrorProvider>
      </DeploymentGroupProvider>
    </ThemeProvider>
  </React.StrictMode>,
)