Skip to content

Commit 363f1ee

Browse files
committed
bug fix
1 parent 72c3b8d commit 363f1ee

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/main.jsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react";
2-
import ReactDOM from "react-dom";
2+
import { createRoot } from "react-dom/client";
33
import App from "./App.jsx";
44
import "./index.css";
55
import { RouterProvider, createBrowserRouter } from "react-router-dom";
@@ -9,7 +9,6 @@ import Team from "pages/Team/Team.jsx";
99
import MainLayout from "components/Layout/MainLayout.jsx";
1010
import Coc from "pages/Coc/Coc.jsx";
1111

12-
1312
const routes = [
1413
{
1514
path: "/",
@@ -25,8 +24,8 @@ const routes = [
2524
},
2625
{
2726
path: "/coc",
28-
element:<Coc/>
29-
}
27+
element: <Coc />,
28+
},
3029
],
3130
},
3231
{
@@ -36,12 +35,11 @@ const routes = [
3635
];
3736

3837
const router = createBrowserRouter(routes);
39-
//error in this file
40-
ReactDOM.render(
38+
39+
createRoot(document.getElementById("root")).render(
4140
<React.StrictMode>
4241
<App>
4342
<RouterProvider router={router} />
4443
</App>
45-
</React.StrictMode>,
46-
document.getElementById("root")
44+
</React.StrictMode>
4745
);

0 commit comments

Comments
 (0)