| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 1x 1x 4x 4x 2x 1x 1x | import {OPEN_FLOATING_VIEW, CLOSE_FLOATING_VIEW} from "../action/floating-view";
const initialState = {
visibility: false,
};
export function floatingView(state = initialState, action) {
const {type} = action;
switch (type) {
case OPEN_FLOATING_VIEW:
return Object.assign({}, state, {visibility: true});
case CLOSE_FLOATING_VIEW:
return Object.assign({}, state, {visibility: false});
default:
return state;
}
} |