@@ -2,12 +2,12 @@ import 'babel-polyfill';
22import React from 'react' ;
33import ReactDOM from 'react-dom' ;
44import { Provider } from 'react-redux' ;
5- import { Router } from 'react-router' ;
6- import { browserHistory } from 'react-router' ;
7- import { syncHistoryWithStore } from 'react-router-redux' ;
5+ import { BrowserRouter } from 'react-router-dom ' ;
6+ // import { browserHistory } from 'react-router';
7+ // import { syncHistoryWithStore } from 'react-router-redux';
88import { AppContainer } from 'react-hot-loader' ;
99import configureStore from 'store' ;
10- import routes from 'routes ' ;
10+ import App from 'containers/App ' ;
1111
1212/* Images
1313 * This space is reserved for images that are required by server rendering,
@@ -22,24 +22,26 @@ const rootElement = document.getElementById('app');
2222// rendering.
2323const initialState = window . __INITIAL_STATE__ ;
2424const store = configureStore ( initialState ) ;
25- const history = syncHistoryWithStore ( browserHistory , store ) ;
25+ // const history = syncHistoryWithStore(browserHistory, store);
2626
27- const render = ( routes ) => {
27+ const render = ( Component ) => {
2828 ReactDOM . render (
2929 < Provider store = { store } >
3030 < AppContainer >
31- < Router history = { history } routes = { routes } />
31+ < BrowserRouter >
32+ < Component />
33+ </ BrowserRouter >
3234 </ AppContainer >
3335 </ Provider > ,
3436 rootElement
3537 ) ;
3638} ;
3739
38- render ( routes ) ;
40+ render ( App ) ;
3941
4042if ( module . hot ) {
41- module . hot . accept ( '../common/js/routes' , ( ) => {
42- const newRoutes = require ( '../common/js/routes' ) . default ;
43- render ( newRoutes ) ;
43+ // We need to re-require the main App module.
44+ module . hot . accept ( '../common/js/containers/App' , ( ) => {
45+ render ( require ( '../common/js/containers/App' ) . default ) ;
4446 } ) ;
4547}
0 commit comments