malavikapradeep2001 commited on
Commit
39a2f28
·
verified ·
1 Parent(s): 9045d43

Deploy Pathora Viewer: components, routes, and tile server

Browse files
Files changed (1) hide show
  1. 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 { render } from "react-dom";
4
- import { App } from "./App";
5
- render(<App />, document.getElementById("root"));
 
 
 
 
 
 
 
 
 
 
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 />);