import * as React from "react";
import { createRoot } from 'react-dom/client';
import { BrowserRouter, Routes, Route } from "react-router-dom";
import Authorization from "./Components/Authorization";
import Sections from "./Components/Sections";
import LoggedIn from "./Components/LoggedIn";
import Error404 from "./Components/Error404";


const container = document.getElementById('root');
const root = createRoot(container!);
root.render(
    <React.StrictMode>
        <BrowserRouter>
            <Routes>
                <Route path="/" element={ <Authorization /> } />
                <Route path="/dispatch" element={ <Sections /> } />
                <Route path="/users" element={ <LoggedIn /> } />
                <Route path="/modalAdmin" element={ <LoggedIn /> } />
                <Route path="/modalUser" element={ <LoggedIn /> } />
                <Route
                    path="*"
                    element={ <Error404 /> }
                />
            </Routes>
      </BrowserRouter>
    </React.StrictMode>
);