diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js index bb05435be..f9f83653d 100644 --- a/app/javascript/packs/public.js +++ b/app/javascript/packs/public.js @@ -14,12 +14,6 @@ window.addEventListener('message', e => { id: data.id, height: document.getElementsByTagName('html')[0].scrollHeight, }, '*'); - - if (document.fonts && document.fonts.ready) { - document.fonts.ready.then(sizeBioText); - } else { - sizeBioText(); - } }); }); @@ -85,6 +79,17 @@ function main() { }) .catch(error => console.error(error)); } + + [].forEach.call(document.querySelectorAll('[data-component="Card"]'), (content) => { + const props = JSON.parse(content.getAttribute('data-props')); + ReactDOM.render(, content); + }); + + if (document.fonts && document.fonts.ready) { + document.fonts.ready.then(sizeBioText); + } else { + sizeBioText(); + } }); delegate(document, '.webapp-btn', 'click', ({ target, button }) => {