%PDF- %PDF-
Direktori : /home/emergentqj/actioncivile/pre-auth/def/static/js/reducers/ |
Current File : /home/emergentqj/actioncivile/pre-auth/def/static/js/reducers/migration.js |
import { fromJS } from "immutable"; import LIST_ACTIONS from "../constants/action_types"; const initialState = fromJS({ isDone: false, error: false, }); const migration = (state = initialState, action = {}) => { switch (action.type) { case LIST_ACTIONS.MIGRATION_DONE: return state.set("isDone", true); case LIST_ACTIONS.MIGRATION_ERROR: return state.set("error", true); case LIST_ACTIONS.MIGRATION_RESET: return initialState; default: return state; } }; export default migration;