first commit
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
import ReactDOM from "react-dom/client";
|
||||
import { createBrowserRouter, RouterProvider } from "react-router-dom";
|
||||
import "./index.css";
|
||||
import HomePage from "./pages/HomePage.tsx";
|
||||
import DashboardPage from "./pages/DashboardPage.tsx";
|
||||
import ProtectedRoute from "./utils/ProtectedRoute.tsx";
|
||||
import LoginPage from "./pages/LoginPage.tsx";
|
||||
import RegistrationPage from "./pages/RegistrationPage.tsx";
|
||||
import RegistrationCompanyPage from "./pages/RegistrationCompanyPage.tsx";
|
||||
import RegistrationManagerPage from "./pages/RegistrationManagerPage.tsx";
|
||||
|
||||
const router = createBrowserRouter([
|
||||
{
|
||||
path: "/",
|
||||
children: [
|
||||
{
|
||||
index: true,
|
||||
element: <HomePage />,
|
||||
},
|
||||
{
|
||||
path: "login",
|
||||
element: <LoginPage />,
|
||||
},
|
||||
{
|
||||
path: "registration",
|
||||
children: [
|
||||
{
|
||||
index: true,
|
||||
element: <RegistrationPage />,
|
||||
},
|
||||
{
|
||||
path: "company",
|
||||
element: <RegistrationCompanyPage />,
|
||||
},
|
||||
{
|
||||
path: "manager",
|
||||
element: <RegistrationManagerPage />,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "dashboard",
|
||||
element: <ProtectedRoute />,
|
||||
children: [
|
||||
{
|
||||
index: true,
|
||||
element: <DashboardPage />,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
||||
|
||||
ReactDOM.createRoot(document.getElementById("root")!).render(
|
||||
// <React.StrictMode>
|
||||
<RouterProvider router={router} />
|
||||
// </React.StrictMode>,
|
||||
);
|
||||
Reference in New Issue
Block a user