Sha256: 16089debe78b29e5f698bc8cf282c1fbbc6205966f7ddc94a61b601bed6dabb6
Contents?: true
Size: 671 Bytes
Versions: 96
Compression:
Stored size: 671 Bytes
Contents
import Immutable from 'seamless-immutable'; import { SYSTEM_STATUSES_FAILURE, SYSTEM_STATUSES_SUCCESS, SYSTEM_STATUSES_REQUEST, } from './SystemStatusesConsts'; const initialState = Immutable({ services: {}, loaderStatus: '', }); export default (state = initialState, action) => { switch (action.type) { case SYSTEM_STATUSES_REQUEST: return state.set('loaderStatus', 'PENDING'); case SYSTEM_STATUSES_SUCCESS: return state .set('services', action.payload.services) .set('loaderStatus', 'RESOLVED'); case SYSTEM_STATUSES_FAILURE: return state.set('loaderStatus', 'ERROR'); default: return state; } };
Version data entries
96 entries across 96 versions & 1 rubygems