diff --git a/client/modules/IDE/pages/IDEView.js b/client/modules/IDE/pages/IDEView.js index d989a015..5fb8f038 100644 --- a/client/modules/IDE/pages/IDEView.js +++ b/client/modules/IDE/pages/IDEView.js @@ -27,7 +27,6 @@ import SplitPane from 'react-split-pane'; import Overlay from '../../App/components/Overlay'; import SketchList from '../components/SketchList'; import About from '../components/About'; -import classNames from 'classnames'; class IDEView extends React.Component { constructor(props) { @@ -62,6 +61,8 @@ class IDEView extends React.Component { this.props.router.setRouteLeaveHook(this.props.route, () => this.warnIfUnsavedChanges()); window.onbeforeunload = () => this.warnIfUnsavedChanges(); + + document.body.className = this.props.preferences.theme; } componentWillUpdate(nextProps) { @@ -76,6 +77,10 @@ class IDEView extends React.Component { if (nextProps.params.project_id && !this.props.params.project_id) { this.props.getProject(nextProps.params.project_id); } + + if (nextProps.preferences.theme !== this.props.preferences.theme) { + document.body.className = nextProps.preferences.theme; + } } componentDidUpdate(prevProps) { @@ -157,164 +162,157 @@ class IDEView extends React.Component { } render() { - let ideClass = classNames({ - ide: true, - light: this.props.preferences.theme === 'light', - dark: this.props.preferences.theme === 'dark', - }); return ( -
-
- {this.props.toast.isVisible && } -