You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
660 B

  1. import loadPolyfills from 'flavours/glitch/util/load_polyfills';
  2. function loaded() {
  3. const ComposeContainer = require('flavours/glitch/containers/compose_container').default;
  4. const React = require('react');
  5. const ReactDOM = require('react-dom');
  6. const mountNode = document.getElementById('mastodon-compose');
  7. if (mountNode !== null) {
  8. const props = JSON.parse(mountNode.getAttribute('data-props'));
  9. ReactDOM.render(<ComposeContainer {...props} />, mountNode);
  10. }
  11. }
  12. function main() {
  13. const ready = require('flavours/glitch/util/ready').default;
  14. ready(loaded);
  15. }
  16. loadPolyfills().then(main).catch(error => {
  17. console.error(error);
  18. });