forked from cerner/ascvd-risk-calculator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.jsx
More file actions
24 lines (23 loc) · 879 Bytes
/
Copy pathindex.jsx
File metadata and controls
24 lines (23 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import React from 'react';
import ReactDOM from 'react-dom';
import Entry from './components/Entry/entry';
import ASCVDRisk from './app/load_fhir_data';
import './app/polyfill';
ASCVDRisk.fetchPatientData().then(
() => {
const loadingNode = document.getElementById('loadingIndicator');
while (loadingNode.firstChild) {
loadingNode.removeChild(loadingNode.firstChild);
}
loadingNode.parentNode.removeChild(loadingNode);
ReactDOM.render(<Entry displayErrorScreen={false} />, document.getElementById('container'));
},
() => {
const loadingNode = document.getElementById('loadingIndicator');
while (loadingNode.firstChild) {
loadingNode.removeChild(loadingNode.firstChild);
}
loadingNode.parentNode.removeChild(loadingNode);
ReactDOM.render(<Entry displayErrorScreen={true} />, document.getElementById('container'));
}
);