index.ts 676 B

1234567891011121314151617181920212223
  1. import { combineReducers } from '@reduxjs/toolkit';
  2. import { persistReducer } from 'redux-persist';
  3. import storage from 'redux-persist/lib/storage';
  4. import reducerContacts from '../contacts/reducer'
  5. import reducerControlApp from '../controlApp/reducer'
  6. import reducerLoading from '../loading/reducer';
  7. import reducerAuthorization from '../authorization/reducer';
  8. const authorizationPersistConfig = {
  9. key: 'auth',
  10. storage: storage,
  11. };
  12. export const rootReducer = combineReducers({
  13. isLoading: reducerLoading,
  14. contacts:reducerContacts,
  15. controlApp: reducerControlApp,
  16. authorization: persistReducer(
  17. authorizationPersistConfig,
  18. reducerAuthorization,
  19. ),
  20. });