2020-07-04 12:14:36 -07:00
|
|
|
import { PATRON_INSTANCE_FETCH_SUCCESS } from '../actions/patron';
|
2020-03-31 15:45:12 -07:00
|
|
|
import { Map as ImmutableMap, fromJS } from 'immutable';
|
|
|
|
|
|
|
|
const initialState = ImmutableMap();
|
|
|
|
|
|
|
|
export default function patron(state = initialState, action) {
|
|
|
|
switch(action.type) {
|
2020-07-04 12:14:36 -07:00
|
|
|
case PATRON_INSTANCE_FETCH_SUCCESS:
|
|
|
|
return fromJS(action.instance);
|
2020-03-31 15:45:12 -07:00
|
|
|
default:
|
|
|
|
return state;
|
|
|
|
}
|
|
|
|
};
|