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