forked from NexusOnePlus/Note-Codes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tsx
30 lines (29 loc) · 1.04 KB
/
main.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import "./index.css";
// @deno-types="@types/react"
import { StrictMode } from "react";
// @deno-types="@types/react-dom/client"
import { createRoot } from "react-dom/client";
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import App from "./App.tsx";
import Hk from "./hackerank/index.tsx"
import Cf from "./codeforces/index.tsx"
import Ou from "./omegaup/index.tsx"
import Hack from "./hackerank/code.tsx"
import Coder from "./codeforces/code.tsx"
import Op from "./omegaup/code.tsx"
import New from "./utils/input.tsx"
const router = createBrowserRouter([
{ path: "/hackerank", element: <Hk/> },
{ path: "/codeforces", element: <Cf/> },
{ path: "/omegaup", element: <Ou/> },
{ path: "/hackerank/:id", element: <Hack/>},
{ path: "/codeforces/:id", element: <Coder/>},
{ path: "/omegaup/:id", element: <Op/>},
{ path: "/new/:pt", element: <New />},
{ path: "/*", element: <App />},
]);
createRoot(document.getElementById("root") as HTMLElement).render(
<StrictMode>
<RouterProvider router={router} />
</StrictMode>,
);