Files
talk/plugins/talk-plugin-moderation-actions/client/reducer.js
T
Belen Curcio c93b53c25b pdates
2017-09-11 15:11:22 -03:00

23 lines
408 B
JavaScript

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