|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import { configureStore } from "@reduxjs/toolkit"; |
|
|
|
|
import { applyMiddleware, compose, createStore} from "redux"; |
|
|
|
|
import { applyMiddleware, compose, createStore } from "redux"; |
|
|
|
|
// import thunk from "redux-thunk";
|
|
|
|
|
import { persistStore } from 'redux-persist'; |
|
|
|
|
import thunkMiddleware from 'redux-thunk'; |
|
|
|
@ -7,12 +7,7 @@ import persistedReducer from "./reducers";
|
|
|
|
|
|
|
|
|
|
const enhancers = [ |
|
|
|
|
applyMiddleware( |
|
|
|
|
thunkMiddleware, |
|
|
|
|
// createLogger({
|
|
|
|
|
// collapsed: true,
|
|
|
|
|
// // eslint-disable-next-line no-undef
|
|
|
|
|
// predicate: () => __DEV__,
|
|
|
|
|
// }),
|
|
|
|
|
thunkMiddleware |
|
|
|
|
), |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
@ -27,9 +22,5 @@ const composeEnhancers =
|
|
|
|
|
const enhancer = composeEnhancers(...enhancers); |
|
|
|
|
|
|
|
|
|
export const store = createStore(persistedReducer, {}, enhancer) |
|
|
|
|
// export const store = configureStore(persistedReducer, enhancer);
|
|
|
|
|
// export const store = configureStore( {
|
|
|
|
|
// persistedReducer,
|
|
|
|
|
// enhancers: enhancer
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
export const persistor = persistStore(store); |