-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tsx
40 lines (36 loc) · 895 Bytes
/
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
31
32
33
34
35
36
37
38
39
40
import "./index.css";
import React from "react";
import ReactDOM from "react-dom/client";
import { RouterProvider, createBrowserRouter } from "react-router-dom";
import { Layout } from "./layout/Layout/Layout.tsx";
import { Contacts, Examples, Menu, Error } from "./pages/index";
console.log("Разработчик", "https://github.com/southatelove");
const router = createBrowserRouter([
{
path: "/",
element: <Layout />,
children: [
{
path: "/",
element: <Menu />,
},
{
path: "/contacts",
element: <Contacts />,
},
{
path: "/examples",
element: <Examples />,
},
{
path: "*",
element: <Error />,
},
],
},
]);
ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<RouterProvider router={router} />
</React.StrictMode>
);