Sha256: 3b485555681369fa4ff4ec63484da65e8a79d39d4a14d77f72b88587396ff057
Contents?: true
Size: 766 Bytes
Versions: 12
Compression:
Stored size: 766 Bytes
Contents
import { initialApiState } from '../../../services/api'; import { ANSIBLE_COLLECTION_DETAILS_REQUEST, ANSIBLE_COLLECTION_DETAILS_SUCCESS, ANSIBLE_COLLECTION_DETAILS_ERROR, } from './AnsibleCollectionDetailsConstants'; export default (state = initialApiState, action) => { switch (action.type) { case ANSIBLE_COLLECTION_DETAILS_REQUEST: { return state.set('loading', true); } case ANSIBLE_COLLECTION_DETAILS_SUCCESS: { const ansibleCollectionDetails = action.response; return state.merge({ ...ansibleCollectionDetails, loading: false, }); } case ANSIBLE_COLLECTION_DETAILS_ERROR: { return state.merge({ error: action.payload.message, loading: false, }); } default: { return state; } } };
Version data entries
12 entries across 12 versions & 1 rubygems