import { createStore, compose, applyMiddleware } from 'redux';
import { syncHistoryWithStore } from 'react-router-redux';
import thunk from 'redux-thunk';
import { browserHistory } from 'react-router';
import createLogger from 'redux-logger';
import rootReducer from '../reducers/index';
import initialState from './initialState';

const loggerMiddleware = createLogger();

const enhancers = compose(
  applyMiddleware(
    thunk,
    loggerMiddleware
  ),
  window.devToolsExtension && window.devToolsExtension()
);

const store = createStore(
  rootReducer,
  initialState,
  enhancers,
);

export const history = syncHistoryWithStore(browserHistory, store);

if (module.hot) {
  module.hot.accept('../reducers/', () => {
    const nextRootReducer = require('../reducers/index').default;
    store.replaceReducer(nextRootReducer);
  });
}

export default store;

@@ -232,24 +232,82 @@
 ux-logger';%0A
+import promiseMiddleware from 'redux-promise-middleware';%0A
 import rootR
@@ -482,16 +482,41 @@
  thunk,%0A
+    promiseMiddleware(),%0A
     logg

add promise middleware to store.js