mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-25 06:13:43 +01:00
24 lines
636 B
JavaScript
24 lines
636 B
JavaScript
import TimelineContainer from '../mastodon/containers/timeline_container';
|
|
import React from 'react';
|
|
import ReactDOM from 'react-dom';
|
|
import loadPolyfills from '../mastodon/load_polyfills';
|
|
import ready from '../mastodon/ready';
|
|
|
|
require.context('../images/', true);
|
|
|
|
function loaded() {
|
|
const mountNode = document.getElementById('mastodon-timeline');
|
|
|
|
if (mountNode !== null) {
|
|
const props = JSON.parse(mountNode.getAttribute('data-props'));
|
|
ReactDOM.render(<TimelineContainer {...props} />, mountNode);
|
|
}
|
|
}
|
|
|
|
function main() {
|
|
ready(loaded);
|
|
}
|
|
|
|
loadPolyfills().then(main).catch(error => {
|
|
console.error(error);
|
|
});
|