import { combineReducers } from "redux";
import { persistReducer } from "redux-persist";
import storage from "redux-persist/lib/storage";
import applicationReducer from "./application/application.reducer";
import userReducer from "./user/user.reducer";

const persistConfig = {
  key: "root",
  storage,
  blacklist: ["application", "user"],
};

const rootReducer = combineReducers({
  application: applicationReducer,
  user: userReducer,
});

export default persistReducer(persistConfig, rootReducer);
