-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.tsx
39 lines (34 loc) · 1002 Bytes
/
index.tsx
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
35
36
37
38
39
import './assets/styles/reset.scss'
import './assets/styles/globals.scss'
import './assets/styles/index.scss'
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import { Provider } from 'react-redux'
import {
createHashRouter,
createRoutesFromElements,
Route,
RouterProvider,
} from 'react-router'
import { HelmetProvider } from 'react-helmet-async'
import { store } from './services/store'
import App from './components/app/app'
import MainPage from './pages/main-page/main-page'
import SecondPage from './pages/page-2/second-page'
const router = createHashRouter(
createRoutesFromElements(
<Route path='/' element={<App />}>
<Route index element={<MainPage />} />
<Route path='/page-2' element={<SecondPage />} />
</Route>
)
)
createRoot(document.querySelector('#root') as HTMLDivElement).render(
<StrictMode>
<Provider store={store}>
<HelmetProvider>
<RouterProvider router={router} />
</HelmetProvider>
</Provider>
</StrictMode>
)