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.

26 lines
716 B

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