Sha256: cb144b0084a81f4f96cba3d5bb3f76225b8fd732c83ab4cc0ba3a02948c99eb4
Contents?: true
Size: 588 Bytes
Versions: 64
Compression:
Stored size: 588 Bytes
Contents
import Immutable from 'seamless-immutable'; import { GET_ORGANIZATION_REQUEST, GET_ORGANIZATION_SUCCESS, GET_ORGANIZATION_FAILURE, } from './OrganizationConstants'; const initialState = Immutable({ loading: false }); export default (state = initialState, action) => { switch (action.type) { case GET_ORGANIZATION_REQUEST: return state.set('loading', true); case GET_ORGANIZATION_SUCCESS: return Immutable({ loading: false, ...action.response }); case GET_ORGANIZATION_FAILURE: return Immutable({ error: action.error }); default: return state; } };
Version data entries
64 entries across 64 versions & 1 rubygems