[Glitch] use configureStore of redux-toolkit instead of createStore of redux
Port 8227af8dcc to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
			
			
This commit is contained in:
		
				
					committed by
					
						
						Claire
					
				
			
			
				
	
			
			
			
						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 appReducer from '../reducers';
 | 
			
		||||
import loadingBarMiddleware from '../middleware/loading_bar';
 | 
			
		||||
import errorsMiddleware from '../middleware/errors';
 | 
			
		||||
import soundsMiddleware from '../middleware/sounds';
 | 
			
		||||
 | 
			
		||||
export default function configureStore() {
 | 
			
		||||
  return createStore(appReducer, compose(applyMiddleware(
 | 
			
		||||
export const store = configureStore({
 | 
			
		||||
  reducer: appReducer,
 | 
			
		||||
  middleware: [
 | 
			
		||||
    thunk,
 | 
			
		||||
    loadingBarMiddleware({ promiseTypeSuffixes: ['REQUEST', 'SUCCESS', 'FAIL'] }),
 | 
			
		||||
    errorsMiddleware(),
 | 
			
		||||
    soundsMiddleware(),
 | 
			
		||||
  ), window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__() : f => f));
 | 
			
		||||
}
 | 
			
		||||
  ],
 | 
			
		||||
});
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user