adminFront/src/index.tsx

38 lines
1.5 KiB
TypeScript
Raw Normal View History

2022-09-02 06:36:26 +00:00
import * as React from "react";
2022-09-06 11:52:36 +00:00
import { createRoot } from 'react-dom/client';
2022-09-09 13:54:49 +00:00
import { BrowserRouter, Routes, Route } from "react-router-dom";
import Authorization from "./pages/Authorization";
import Sections from "./pages/Sections";
import LoggedIn from "./pages/dashboard";
import Error404 from "./pages/Error404";
2022-09-08 17:21:17 +00:00
2022-09-02 06:36:26 +00:00
2022-09-06 11:52:36 +00:00
const container = document.getElementById('root');
const root = createRoot(container!);
root.render(
<React.StrictMode>
2022-09-09 13:54:49 +00:00
<BrowserRouter>
<Routes>
<Route path="/" element={ <Authorization /> } />
<Route path="/dispatch" element={ <Sections /> } />
2022-09-20 10:07:27 +00:00
2022-10-20 03:05:10 +00:00
<Route path="/users" element={ <LoggedIn section={1} /> } />
<Route path="/entities" element={ <LoggedIn section={2} /> } />
2022-09-20 17:55:21 +00:00
<Route path="/tariffs" element={ <LoggedIn section={3} /> } />
2022-10-20 03:05:10 +00:00
<Route path="/discounts" element={ <LoggedIn section={4} /> } />
<Route path="/promocode" element={ <LoggedIn section={5} /> } />
<Route path="/support" element={ <LoggedIn section={8} /> } />
2022-09-20 17:55:21 +00:00
2022-09-21 13:47:45 +00:00
<Route path="/modalAdmin" element={ <LoggedIn section={-1} /> } />
<Route path="/modalUser" element={ <LoggedIn section={-1} /> } />
<Route path="/modalEntities" element={ <LoggedIn section={-1} /> } />
2022-09-09 13:54:49 +00:00
<Route
path="*"
element={ <Error404 /> }
/>
</Routes>
</BrowserRouter>
2022-09-06 11:52:36 +00:00
</React.StrictMode>
);