blob: e5e1489de11d6439cb63455751dae794bb5a09bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
import * as R from 'ramda';
import * as actions from '/imports/ui/actions/main-app.actions';
const defaultState = {
selectedEnvironment: {},
};
export function reducer(state = defaultState, action) {
switch (action.type) {
case actions.SET_MAIN_APP_SELECTED_ENVIRONMENT:
return R.assoc('selectedEnvironment', {
_id: action.payload._id,
name: action.payload.name
}, state);
default:
return state;
}
}
|