Spaces:
Running
Running
Commit ·
41a16b2
1
Parent(s): 9045d43
Deploy Pathora Viewer: components, routes, and tile server (#5)
Browse files- Deploy Pathora Viewer: components, routes, and tile server (39a2f28fec1b0d2ea8892191d72dc896e3e88eec)
- 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 />);
|