2016-09-01 00:15:12 +10:00
|
|
|
import { createStore, applyMiddleware, compose } from 'redux';
|
2017-01-09 22:37:15 +11:00
|
|
|
import thunk from 'redux-thunk';
|
|
|
|
import appReducer from '../reducers';
|
2017-01-16 23:27:58 +11:00
|
|
|
import loadingBarMiddleware from '../middleware/loading_bar';
|
2017-01-09 22:37:15 +11:00
|
|
|
import errorsMiddleware from '../middleware/errors';
|
2017-01-18 06:09:03 +11:00
|
|
|
import soundsMiddleware from 'redux-sounds';
|
2017-01-21 06:14:02 +11:00
|
|
|
import Howler from 'howler';
|
2017-01-09 22:37:15 +11:00
|
|
|
import Immutable from 'immutable';
|
2016-08-25 01:56:44 +10:00
|
|
|
|
2017-01-21 06:14:02 +11:00
|
|
|
Howler.mobileAutoEnable = false;
|
|
|
|
|
2017-01-18 06:09:03 +11:00
|
|
|
const soundsData = {
|
|
|
|
boop: '/sounds/boop.mp3'
|
|
|
|
};
|
|
|
|
|
2017-01-09 22:37:15 +11:00
|
|
|
export default function configureStore() {
|
2017-01-18 06:09:03 +11:00
|
|
|
return createStore(appReducer, compose(applyMiddleware(
|
|
|
|
thunk,
|
|
|
|
loadingBarMiddleware({ promiseTypeSuffixes: ['REQUEST', 'SUCCESS', 'FAIL'] }),
|
|
|
|
errorsMiddleware(),
|
|
|
|
soundsMiddleware(soundsData)
|
|
|
|
), window.devToolsExtension ? window.devToolsExtension() : f => f));
|
2016-09-20 07:25:59 +10:00
|
|
|
};
|