15 lines
329 B
JavaScript
15 lines
329 B
JavaScript
|
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;
|