闭社主体 forked from https://github.com/tootsuite/mastodon
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.

24 lines
709 B

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