pleroma/app/packs/about.js

28 lines
735 B
JavaScript
Raw Normal View History

2020-03-27 13:59:38 -07:00
'use strict';
2020-05-28 15:52:07 -07:00
import loadPolyfills from '../soapbox/load_polyfills';
import { start } from '../soapbox/common';
2020-03-27 13:59:38 -07:00
start();
function loaded() {
2020-05-28 15:52:07 -07:00
const TimelineContainer = require('../soapbox/containers/timeline_container').default;
2020-03-27 13:59:38 -07:00
const React = require('react');
const ReactDOM = require('react-dom');
2020-05-28 15:52:07 -07:00
const mountNode = document.getElementById('soapbox-timeline');
2020-03-27 13:59:38 -07:00
if (mountNode !== null) {
const props = JSON.parse(mountNode.getAttribute('data-props'));
ReactDOM.render(<TimelineContainer {...props} />, mountNode);
}
}
function main() {
2020-05-28 15:52:07 -07:00
const ready = require('../soapbox/ready').default;
2020-03-27 13:59:38 -07:00
ready(loaded);
}
loadPolyfills().then(main).catch(error => {
console.error(error);
});