Spaces:
Sleeping
Sleeping
Deploy Pathora Viewer: components, routes, and tile server
Browse files- frontend/src/index.tsx +14 -5
frontend/src/index.tsx
CHANGED
|
@@ -1,5 +1,14 @@
|
|
| 1 |
-
import './index.css';
|
| 2 |
-
import React from "react";
|
| 3 |
-
import {
|
| 4 |
-
import {
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import './index.css';
|
| 2 |
+
import React from "react";
|
| 3 |
+
import { createRoot } from "react-dom/client";
|
| 4 |
+
import { AppRouter } from "./AppRouter";
|
| 5 |
+
|
| 6 |
+
let rootElement = document.getElementById("root");
|
| 7 |
+
if (!rootElement) {
|
| 8 |
+
rootElement = document.createElement("div");
|
| 9 |
+
rootElement.id = "root";
|
| 10 |
+
document.body.appendChild(rootElement);
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
const root = createRoot(rootElement);
|
| 14 |
+
root.render(<AppRouter />);
|