UNPKG

cspace-ui

Version:
34 lines (33 loc) 743 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; exports.getResponse = getResponse; exports.isPending = isPending; var _actionCodes = require("../constants/actionCodes"); var _default = (state = {}, action) => { switch (action.type) { case _actionCodes.LOGOUT_STARTED: return { ...state, isPending: true, response: null }; case _actionCodes.LOGOUT_FULFILLED: return { ...state, isPending: false, response: action.payload }; default: return state; } }; exports.default = _default; function isPending(state) { return state.isPending; } function getResponse(state) { return state.response; }