2016-08-31 17:15:12 +03:00
|
|
|
import { createStore, applyMiddleware, compose } from 'redux';
|
2017-01-09 13:37:15 +02:00
|
|
|
import thunk from 'redux-thunk';
|
2017-07-09 13:16:08 +03:00
|
|
|
import appReducer from '../reducers';
|
2017-01-16 14:27:58 +02:00
|
|
|
import loadingBarMiddleware from '../middleware/loading_bar';
|
2017-01-09 13:37:15 +02:00
|
|
|
import errorsMiddleware from '../middleware/errors';
|
2017-03-13 18:12:30 +02:00
|
|
|
import soundsMiddleware from '../middleware/sounds';
|
2016-08-24 18:56:44 +03:00
|
|
|
|
2017-01-09 13:37:15 +02:00
|
|
|
export default function configureStore() {
|
2017-07-09 13:16:08 +03:00
|
|
|
return createStore(appReducer, compose(applyMiddleware(
|
2017-01-17 21:09:03 +02:00
|
|
|
thunk,
|
|
|
|
loadingBarMiddleware({ promiseTypeSuffixes: ['REQUEST', 'SUCCESS', 'FAIL'] }),
|
|
|
|
errorsMiddleware(),
|
2020-03-08 17:02:36 +02:00
|
|
|
soundsMiddleware(),
|
2018-12-31 19:11:48 +02:00
|
|
|
), window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__() : f => f));
|
2016-09-20 00:25:59 +03:00
|
|
|
};
|