userLogoutReasonReducer.js 699 Bytes
/**
 * sub app userLogout
 * @author: lixia.zhang
 * @date: 2018/04/13
 */

'use strict';

import InitialState from './userLogoutReasonInitialState';
import Immutable, {Map} from 'immutable';

const {
    ENABLE_SUBMIT_BTN,
    SHOW_LOGOUT_REASON_MODAL
} = require('../../constants/actionTypes').default;

const initialState = new InitialState;

export default function userLogoutReasonReducer(state = initialState, action) {
    switch(action.type) {
        case ENABLE_SUBMIT_BTN:{
            return state.set('submitBtnEnable',action.payload);
        }
        case SHOW_LOGOUT_REASON_MODAL: {
            return state.set('showModalFlag',action.payload);
        }

    }
    return state;
}