2017-05-03 09:04:16 +09:00
|
|
|
import Mastodon from 'mastodon/containers/mastodon';
|
|
|
|
import React from 'react';
|
|
|
|
import ReactDOM from 'react-dom';
|
2017-05-09 21:50:43 +09:00
|
|
|
import Rails from 'rails-ujs';
|
2017-05-03 09:04:16 +09:00
|
|
|
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');
|
|
|
|
|
2017-05-09 21:50:43 +09:00
|
|
|
Rails.start();
|
|
|
|
|
2017-05-03 09:04:16 +09:00
|
|
|
require.context('../images/', true);
|
2017-05-10 02:51:45 +09:00
|
|
|
require.context('../../assets/stylesheets/', false, /custom.*\.scss$/);
|
2017-05-03 09:04:16 +09:00
|
|
|
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
const mountNode = document.getElementById('mastodon');
|
|
|
|
const props = JSON.parse(mountNode.getAttribute('data-props'));
|
|
|
|
|
|
|
|
ReactDOM.render(<Mastodon {...props} />, mountNode);
|
|
|
|
});
|