Created the main.jsx

This commit is contained in:
Mathias Wagner
2024-03-09 10:50:18 +01:00
parent bae22aea05
commit b4785659a6

27
web/src/main.jsx Normal file
View File

@@ -0,0 +1,27 @@
import React from "react";
import ReactDOM from "react-dom/client";
import "@/common/styles/fonts.sass";
import "@/common/styles/default.sass";
import {createBrowserRouter, RouterProvider} from "react-router-dom";
import Root from "@/common/layouts/Root";
import NotFound from "@/pages/NotFound";
const router = createBrowserRouter([
{
path: "/",
element: <Root/>,
errorElement: <NotFound />,
children: [
{
path: "/",
element: <h2>Home</h2>
}
]
}
]);
ReactDOM.createRoot(document.getElementById("root")).render(
<React.StrictMode>
<RouterProvider router={router}/>
</React.StrictMode>,
);