MyCrypto/common/index.jsx

33 lines
812 B
React
Raw Normal View History

// Application styles must come first in order, to allow for overrides
import 'assets/styles/etherwallet-master.less';
import 'font-awesome/scss/font-awesome.scss';
import React from 'react';
import { render } from 'react-dom';
2017-07-05 23:28:54 +00:00
import { syncHistoryWithStore } from 'react-router-redux';
import { Root } from 'components';
import { Routing, history } from './routing';
2017-07-05 23:28:54 +00:00
import { store } from './store';
2017-04-12 05:04:27 +00:00
const renderRoot = Root => {
let syncedHistory = syncHistoryWithStore(history, store);
render(
<Root
key={Math.random()}
routes={Routing}
history={syncedHistory}
store={store}
/>,
document.getElementById('app')
);
2017-04-12 05:04:27 +00:00
};
renderRoot(Root);
if (module.hot) {
2017-07-03 18:23:44 +00:00
module.hot.accept('reducers/index', () =>
store.replaceReducer(require('reducers/index').default)
);
2017-04-12 05:04:27 +00:00
}