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