Sha256: be8f6e95b6ff75f43c1ef63f177ffce94a5214e795ecc688a00439e0fb9f110b
Contents?: true
Size: 693 Bytes
Versions: 69
Compression:
Stored size: 693 Bytes
Contents
import Immutable from 'seamless-immutable'; import { MANIFEST_HISTORY_REQUEST, MANIFEST_HISTORY_SUCCESS, MANIFEST_HISTORY_FAILURE, } from './ManifestConstants'; const initialState = Immutable({ loading: true, results: [] }); export default (state = initialState, action) => { switch (action.type) { case MANIFEST_HISTORY_REQUEST: return state.set('loading', true); case MANIFEST_HISTORY_SUCCESS: { const results = action.response; return state.merge({ results, loading: false, }); } case MANIFEST_HISTORY_FAILURE: return state.merge({ error: action.payload.message, loading: false, }); default: return state; } };
Version data entries
69 entries across 69 versions & 1 rubygems