闭社主体 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
636 B

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