static-cms/src/reducers/editor.js

15 lines
329 B
JavaScript
Raw Normal View History

2016-08-11 18:21:32 -03:00
import { Map } from 'immutable';
import { SWITCH_VISUAL_MODE } from '../actions/editor';
const editor = (state = Map({ useVisualMode: true }), action) => {
switch (action.type) {
case SWITCH_VISUAL_MODE:
return Map({ useVisualMode: action.payload });
default:
return state;
}
};
export default editor;