2018-04-30 20:41:12 +00:00
|
|
|
import 'es6-promise/auto';
|
2018-05-06 19:36:05 +00:00
|
|
|
import 'utils/ie11';
|
2015-12-28 23:34:32 +00:00
|
|
|
import React from 'react';
|
|
|
|
import { render } from 'react-dom';
|
2017-02-16 02:55:50 +00:00
|
|
|
|
2017-06-21 06:40:28 +00:00
|
|
|
import Root from 'components/Root';
|
2018-04-05 19:13:32 +00:00
|
|
|
import initRouter from 'utils/router';
|
|
|
|
import Socket from 'utils/Socket';
|
2015-12-28 23:34:32 +00:00
|
|
|
import configureStore from './store';
|
2017-05-07 20:19:15 +00:00
|
|
|
import routes from './routes';
|
2017-05-19 05:29:44 +00:00
|
|
|
import runModules from './modules';
|
2018-04-13 18:47:39 +00:00
|
|
|
import '../css/fonts.css';
|
|
|
|
import '../css/fontello.css';
|
|
|
|
import '../css/style.css';
|
2015-12-28 23:34:32 +00:00
|
|
|
|
2018-04-05 19:13:32 +00:00
|
|
|
const production = process.env.NODE_ENV === 'production';
|
2018-04-05 23:46:22 +00:00
|
|
|
const host = production
|
|
|
|
? window.location.host
|
|
|
|
: `${window.location.hostname}:1337`;
|
2016-01-15 01:27:30 +00:00
|
|
|
const socket = new Socket(host);
|
2017-05-07 20:19:15 +00:00
|
|
|
const store = configureStore(socket);
|
2016-01-26 21:10:44 +00:00
|
|
|
|
2017-05-19 05:29:44 +00:00
|
|
|
initRouter(routes, store);
|
|
|
|
runModules({ store, socket });
|
2017-04-19 23:51:55 +00:00
|
|
|
|
2018-04-05 19:13:32 +00:00
|
|
|
render(<Root store={store} />, document.getElementById('root'));
|