mirror of
https://github.com/gnmyt/myspeed.git
synced 2026-02-12 08:39:48 -06:00
Created the main.jsx
This commit is contained in:
27
web/src/main.jsx
Normal file
27
web/src/main.jsx
Normal 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>,
|
||||
);
|
||||
Reference in New Issue
Block a user