Files
talk/plugins/coral-plugin-viewing-options/client/reducer.js
T
2017-06-08 01:17:36 +07:00

23 lines
408 B
JavaScript

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