-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.jsx
36 lines (34 loc) · 816 Bytes
/
main.jsx
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
31
32
33
34
35
36
import React from "react";
import ReactDOM from "react-dom/client";
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import App from "./App";
import "./index.css";
import Comments from "./routes/comments";
import Movies from "./routes/movies";
import Profile from "./routes/profile";
import Root from "./routes/root";
const router = createBrowserRouter([
{
path: "/",
element: <Root />,
children: [
{
path: "movies",
element: <Movies />,
},
{
path: "comments",
element: <Comments />,
},
{
path: "profile",
element: <Profile />,
},
],
},
]);
ReactDOM.createRoot(document.getElementById("root")).render(
<React.StrictMode>
<RouterProvider router={router} />
</React.StrictMode>
);