-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.jsx
50 lines (47 loc) · 1.13 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import React from "react";
import ReactDOM from "react-dom/client";
import "./index.css";
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import Root from "./ROOT/Root.jsx";
import Home from "./Home/Home.jsx";
import Hero from "./Hero/Hero.jsx";
import Contact from "./Contact/Contact.jsx";
import About from "./About/About.jsx";
import Projects from "./Projects/Projects.jsx";
import Skills from "./skills/Skills.jsx";
const router = createBrowserRouter([
{
path: "/",
element: <Root></Root>,
children: [
{
path: "/",
element: <Home></Home>,
},
{
path: "/hero",
element: <Hero></Hero>,
},{
path: "/contact",
element: <Contact></Contact>,
},
{
path: "/about",
element: <About></About>,
},
{
path: "/Projects",
element: <Projects></Projects>,
},
{
path:'skills',
element:<Skills></Skills>
}
],
},
]);
ReactDOM.createRoot(document.getElementById("root")).render(
<React.StrictMode>
<RouterProvider router={router} />
</React.StrictMode>
);