static-cms/src/root.js

23 lines
580 B
JavaScript
Raw Normal View History

2016-09-13 17:08:26 +02:00
import React from 'react';
import { Provider } from 'react-redux';
import { Route } from 'react-router-dom';
import { ConnectedRouter } from 'react-router-redux';
import history from './routing/history';
import configureStore from './redux/configureStore';
2017-01-10 22:23:22 -02:00
import { setStore } from './valueObjects/AssetProxy';
import App from './containers/App';
2016-09-13 17:08:26 +02:00
const store = configureStore();
2017-01-10 22:23:22 -02:00
setStore(store);
2016-09-13 17:08:26 +02:00
const Root = () => (
<Provider store={store}>
<ConnectedRouter history={history}>
<Route component={App}/>
</ConnectedRouter>
2016-09-13 17:08:26 +02:00
</Provider>
2016-09-13 18:06:01 +02:00
);
2016-09-13 17:08:26 +02:00
2016-09-13 18:06:01 +02:00
export default Root;