| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 1x 2x 3x 2x 1x | import { TOGGLE_PAGELET } from '../actionTypes';
const initialState = {};
const toggle = (state, action) => ({ ...state, [action.pagelet]: action.status });
export default function (state = initialState, action) {
switch (action.type) {
case TOGGLE_PAGELET:
return toggle(state, action);
default:
return state;
}
}
|