-
Notifications
You must be signed in to change notification settings - Fork 0
/
webflow.html
37 lines (36 loc) · 1.35 KB
/
webflow.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html>
<html>
<head>
<!-- MemberStack script -->
<script data-memberstack-app="app_cl7oz7qvt01aa0wi873rdc1w3" src="https://static.memberstack.com/scripts/v1/memberstack.js" type="text/javascript"></script>
<!-- Custom React App -->
<script>
fetch('https://react-webflow-memberstack.jasiek.net/asset-manifest.json')
.then(res => res.json())
.then(res => {
const script = document.createElement('script');
script.setAttribute('type', "text/javascript");
script.setAttribute('src', res.files['main.js']);
document.head.appendChild(script);
const link = document.createElement('link');
link.setAttribute('type', 'text/css');
link.setAttribute('rel', 'stylesheet');
link.setAttribute('href', res.files['main.css']);
document.head.appendChild(link);
})
</script>
</head>
<body>
<button id="button-modal">Open modal</button>
<div id="root-modal"></div>
<div id="root-table"></div>
<script>
// Render the Table when React app is loaded
document.addEventListener("REACTLoaded", () => window.REACT_RENDER('root-table'));
// Open the Modal when button is clicked
document
.getElementById('button-modal')
.addEventListener('click', () => window.REACT_RENDER('root-modal'));
</script>
</body>
</html>