logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

about.js (671B)


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