diff --git a/components/CodeImage.js b/components/CodeImage.js index c5cbfbf..db1fd71 100644 --- a/components/CodeImage.js +++ b/components/CodeImage.js @@ -5,11 +5,6 @@ import CodeMirror from 'react-codemirror' import WindowControls from '../components/svg/Controls' import Spinner from 'react-spinner' -// hack to only call modes on browser -if (typeof window !== 'undefined' && typeof window.navigator !== 'undefined') { - require('../lib/constants') -} - const DEFAULT_SETTINGS = { paddingVertical: '50px', paddingHorizontal: '50px', diff --git a/components/Settings.js b/components/Settings.js index 02d8be2..849aca3 100644 --- a/components/Settings.js +++ b/components/Settings.js @@ -31,8 +31,14 @@ class Settings extends React.Component {
- - + +
diff --git a/components/Toolbar.js b/components/Toolbar.js index 0ab1085..aff3c46 100644 --- a/components/Toolbar.js +++ b/components/Toolbar.js @@ -14,7 +14,7 @@ const Toolbar = (props) => ( onChange={props.onBGChange} bg={props.bg} /> - +
-
- this.setState({ background: color })} - onThemeChange={theme => this.setState({ theme: theme.id })} - onLanguageChange={language => this.setState({ language })} - onSettingsChange={(key, value) => this.setState({ [key]: value })} - bg={this.state.background} - /> - - {this.droppedContent || this.props.content || DEFAULT_CODE} - -
+ { + console.log(droppedContent) + this.setState({ droppedContent }) + }} + > +
+ this.setState({ background: color })} + onThemeChange={theme => this.setState({ theme: theme.id })} + onLanguageChange={language => this.setState({ language })} + onSettingsChange={(key, value) => this.setState({ [key]: value })} + bg={this.state.background} + enabled={this.state} + /> + + {this.state.droppedContent || this.props.content || DEFAULT_CODE} + +
+
a project by @dawn_labs ¬