import * as types from "../../../constants"; import initialState from '../../initialState'; export default function changeEmail(state = initialState.changeEmail, {type, payload: login, error }) { switch (type) { case types.USERS_CHANGE_REQUEST: { return state } case types.USERS_CHANGE_REQUEST_SUCCESS: { return { ...state, login } } case types.USERS_CHANGE_REQUEST_FAILURE: { return { ...state, error } } default: { return state } } }