TTime/frontend/src/main.tsx

21 lines
480 B
TypeScript
Raw Normal View History

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>,
);