Port 8227af8dcc
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
th-downstream
parent
bbd0e9caa6
commit
f4e3e309b1
@ -1,15 +1,16 @@
|
|||||||
import { createStore, applyMiddleware, compose } from 'redux';
|
import { configureStore } from '@reduxjs/toolkit';
|
||||||
import thunk from 'redux-thunk';
|
import thunk from 'redux-thunk';
|
||||||
import appReducer from '../reducers';
|
import appReducer from '../reducers';
|
||||||
import loadingBarMiddleware from '../middleware/loading_bar';
|
import loadingBarMiddleware from '../middleware/loading_bar';
|
||||||
import errorsMiddleware from '../middleware/errors';
|
import errorsMiddleware from '../middleware/errors';
|
||||||
import soundsMiddleware from '../middleware/sounds';
|
import soundsMiddleware from '../middleware/sounds';
|
||||||
|
|
||||||
export default function configureStore() {
|
export const store = configureStore({
|
||||||
return createStore(appReducer, compose(applyMiddleware(
|
reducer: appReducer,
|
||||||
|
middleware: [
|
||||||
thunk,
|
thunk,
|
||||||
loadingBarMiddleware({ promiseTypeSuffixes: ['REQUEST', 'SUCCESS', 'FAIL'] }),
|
loadingBarMiddleware({ promiseTypeSuffixes: ['REQUEST', 'SUCCESS', 'FAIL'] }),
|
||||||
errorsMiddleware(),
|
errorsMiddleware(),
|
||||||
soundsMiddleware(),
|
soundsMiddleware(),
|
||||||
), window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__() : f => f));
|
],
|
||||||
}
|
});
|
||||||
|
Loading…
Reference in new issue