|
|
@ -4,11 +4,10 @@ import AsyncStorage from '@react-native-async-storage/async-storage'; |
|
|
|
|
|
|
|
|
|
|
|
// modules
|
|
|
|
// modules
|
|
|
|
import userReducer from './modules/user/reducers'; |
|
|
|
import userReducer from './modules/user/reducers'; |
|
|
|
import shipmentReducer from './modules/shipment/reducers'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const rootReducer = combineReducers({ |
|
|
|
const rootReducer = combineReducers({ |
|
|
|
userReducer, |
|
|
|
userReducer |
|
|
|
shipmentReducer |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
const appReducer = (state, action) => { |
|
|
|
const appReducer = (state, action) => { |
|
|
@ -22,16 +21,7 @@ const appReducer = (state, action) => { |
|
|
|
const persistConfig = { |
|
|
|
const persistConfig = { |
|
|
|
key: 'root', |
|
|
|
key: 'root', |
|
|
|
storage: AsyncStorage, |
|
|
|
storage: AsyncStorage, |
|
|
|
blacklist: [], // to be not persisted
|
|
|
|
blacklist: [] |
|
|
|
// transforms: [
|
|
|
|
|
|
|
|
// encryptTransform({
|
|
|
|
|
|
|
|
// secretKey: 'T25lc3Bpcml0MjAxOGdtc21vYmlsZQ',
|
|
|
|
|
|
|
|
// onError: function (error) {
|
|
|
|
|
|
|
|
// // Handle the error.
|
|
|
|
|
|
|
|
// console.log("encrypt redux persist error", error)
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// }),
|
|
|
|
|
|
|
|
// ]
|
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
export default persistReducer(persistConfig, appReducer); |
|
|
|
export default persistReducer(persistConfig, appReducer); |