20 lines
480 B
TypeScript
20 lines
480 B
TypeScript
import React from "react";
|
|
import ReactDOM from "react-dom/client";
|
|
import App from "./App.tsx";
|
|
import "./index.css";
|
|
import { createBrowserRouter, RouterProvider } from "react-router-dom";
|
|
|
|
const router = createBrowserRouter([
|
|
{
|
|
path: "/",
|
|
element: <App />,
|
|
},
|
|
]);
|
|
|
|
const root = document.getElementById("root") ?? document.createElement("div");
|
|
|
|
ReactDOM.createRoot(root).render(
|
|
<React.StrictMode>
|
|
<RouterProvider router={router} />
|
|
</React.StrictMode>,
|
|
);
|