Files
talk/plugins/talk-plugin-viewing-options/client/reducer.js
T
2018-01-11 20:00:34 -07:00

23 lines
390 B
JavaScript

import { OPEN_MENU, CLOSE_MENU } from './constants';
const initialState = {
open: false,
};
export default function reducer(state = initialState, action) {
switch (action.type) {
case OPEN_MENU:
return {
...state,
open: true,
};
case CLOSE_MENU:
return {
...state,
open: false,
};
default:
return state;
}
}