import React from "react"; import ReactDOM from "react-dom/client"; import "./index.css"; import { createBrowserRouter, RouterProvider } from "react-router-dom"; import LoginPage from "./Pages/LoginPage.tsx"; import YourProjectsPage from "./Pages/YourProjectsPage.tsx"; import UserProjectPage from "./Pages/UserPages/UserProjectPage.tsx"; import AdminMenuPage from "./Pages/AdminPages/AdminMenuPage.tsx"; import UserEditTimeReportPage from "./Pages/UserPages/UserEditTimeReportPage.tsx"; // This is where the routes are mounted const router = createBrowserRouter([ { path: "/", element: , }, { path: "/your-projects", element: , }, { path: "/project", element: , }, { path: "/admin-menu", element: , }, { path: "/edit-time-report", element: , }, ]); // Semi-hacky way to get the root element const root = document.getElementById("root") ?? document.createElement("div"); // Render the router at the root ReactDOM.createRoot(root).render( , );