static-cms/src/reducers/editor.js

14 lines
336 B
JavaScript
Raw Normal View History

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