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