Remove editor theme switching for now.

This commit is contained in:
Dorian 2017-10-31 08:42:07 -04:00
parent b359159c00
commit fbe07da0ea
3 changed files with 1 additions and 24 deletions

View File

@ -114,13 +114,7 @@ export const RookeriesApp = withRouter(connect(
'title': state.page.title, 'title': state.page.title,
// TODO: Migrate to using standalone editor // TODO: Migrate to using standalone editor
'editorTheme': state.editor.theme,
'userCanEdit': state.user.token !== '' 'userCanEdit': state.user.token !== ''
}, },
'editor': {
'editorTheme': state.editor.theme,
'userCanEdit': state.user.token !== ''
}
}; };
})(App)); })(App));

View File

@ -59,25 +59,8 @@ function userLoginStateReducer(state = {...DEFAULT_USER_LOGIN}, action) {
} }
} }
const DEFAULT_EDITOR_STATE = {
state: 0,
theme: 'default'
};
function editorStateReducer(state = {...DEFAULT_EDITOR_STATE}, action) {
switch (action.type) {
case actions.SWITCH_THEME_ACTION:
return {...state, theme: action.editorTheme};
case actions.LOAD_THEME_ACTION:
return {...state, theme: action.editorTheme};
default:
return state;
}
}
const reducer = combineReducers({ const reducer = combineReducers({
page: pageStateReducer, page: pageStateReducer,
editor: editorStateReducer,
site: siteInfoStateReducer, site: siteInfoStateReducer,
user: userLoginStateReducer, user: userLoginStateReducer,
}); });

View File

@ -194,7 +194,7 @@ export const PageBlock = withRouter(
'slug': state.page.slug, 'slug': state.page.slug,
'article': state.page.content, 'article': state.page.content,
'title': state.page.title, 'title': state.page.title,
'editorTheme': state.editor.theme, 'editorTheme': 'monokai',
'userCanEdit': state.user.token !== '' 'userCanEdit': state.user.token !== ''
}; };
})(EditableMarkdownBlock) })(EditableMarkdownBlock)