Files
talk/plugins/talk-plugin-viewing-options/client/reducer.js
T
2017-07-26 15:17:19 -04:00

23 lines
362 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;
}
}