blob: 367b7e76a935e5653987bbd3741497ecce6f9aab (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import Mastodon from 'mastodon/containers/mastodon';
import React from 'react';
import ReactDOM from 'react-dom';
import Rails from 'rails-ujs';
import 'font-awesome/css/font-awesome.css';
import '../styles/application.scss';
if (!window.Intl) {
require('intl');
require('intl/locale-data/jsonp/en.js');
}
window.Perf = require('react-addons-perf');
Rails.start();
require.context('../images/', true);
require.context('../../assets/stylesheets/', false, /custom.*\.scss$/);
document.addEventListener('DOMContentLoaded', () => {
const mountNode = document.getElementById('mastodon');
const props = JSON.parse(mountNode.getAttribute('data-props'));
ReactDOM.render(<Mastodon {...props} />, mountNode);
});
|