Skip to content
Permalink
v0.9.4
Go to file
 
 
Cannot retrieve contributors at this time
26 lines (21 sloc) 551 Bytes
import { UPDATE_EDITOR_CONFIG_SUCCESS, EDITOR_CONFIG_SUCCESS } from './config-actions';
const initialConfigState = {
editor: { tabSize: 2, useSoftTabs: true, editorTheme: 'dawn' },
};
const config = (state = initialConfigState, action) => {
switch (action.type) {
case UPDATE_EDITOR_CONFIG_SUCCESS:
return {
...state,
editor: action.value,
};
case EDITOR_CONFIG_SUCCESS:
return {
...state,
editor: action.value,
};
default:
return state;
}
};
export default config;