import React from 'react';
import { render } from 'react-dom';
import { createStore, applyMiddleware } from 'redux';
import { Provider } from 'react-redux';
import { applyRouterMiddleware, Router, Route, hashHistory, IndexRedirect, Redirect } from 'react-router';
import { syncHistoryWithStore, routerMiddleware } from 'react-router-redux';
import reducers from './reducers';
const middleware = routerMiddleware(hashHistory);
const store = createStore(
reducers,
applyMiddleware(middleware)
);
const history = syncHistoryWithStore(hashHistory, store);
function scrollToTop() {
window.scrollTo(0, 0);
}
const rootRoute = {
childRoutes: [{
path: '/',
component: require('./containers/App'),
indexRoute: { onEnter: (nextState, replace) => replace('/landing') },
childRoutes: [
require('./routes/app'),
require('./routes/404'),
require('./routes/500'),
require('./routes/admin'),
require('./routes/confirmEmail'),
require('./routes/forgotPassword'),
require('./routes/lockScreen'),
require('./routes/login'),
require('./routes/signUp'),
require('./routes/fullscreen'),
require('./routes/landing'),
require('./routes/orderPOS'),
{
path: '*',
indexRoute: { onEnter: (nextState, replace) => replace('/404') },
}
]
}]
};
render(
<Provider store={store}>
<Router
onUpdate={scrollToTop}
history={history}
routes={rootRoute}
/>
</Provider>,
document.getElementById('app-container')
);
в логах пишет ошибку