Sha256: 0a93721213705a5253b3e337e14c21040f6291addef2c00a96d0d28b9b021ffe
Contents?: true
Size: 723 Bytes
Versions: 62
Compression:
Stored size: 723 Bytes
Contents
import { initialApiState } from '../../../services/api'; import { MODULE_STREAM_DETAILS_REQUEST, MODULE_STREAM_DETAILS_SUCCESS, MODULE_STREAM_DETAILS_FAILURE, } from './ModuleStreamDetailsConstants'; export default (state = initialApiState, action) => { switch (action.type) { case MODULE_STREAM_DETAILS_REQUEST: { return state.set('loading', true); } case MODULE_STREAM_DETAILS_SUCCESS: { const moduleStreamDetails = action.response; return state.merge({ ...moduleStreamDetails, loading: false, }); } case MODULE_STREAM_DETAILS_FAILURE: { return state.merge({ error: action.payload.message, loading: false, }); } default: return state; } };
Version data entries
62 entries across 62 versions & 1 rubygems