diff --git a/src/App.js b/src/App.js index ea9e480..fb96a0b 100644 --- a/src/App.js +++ b/src/App.js @@ -6,6 +6,7 @@ var Settings = require('./Settings') var StoryStore = require('./stores/StoryStore') var UpdatesStore = require('./stores/UpdatesStore') var SettingsStore = require('./stores/SettingsStore') +var CurrentColor = require('./Darkmode') var App = React.createClass({ getInitialState() { @@ -26,7 +27,11 @@ var App = React.createClass({ componentDidMount() { // Empty the prebooted HTML and hydrate using live results from Firebase - this.setState({ prebootHTML: '', showChildren: true }) + this.setState({ + prebootHTML: '', + showChildren: true, + darkMode: SettingsStore.darkMode + }) }, componentWillUnmount() { @@ -48,6 +53,10 @@ var App = React.createClass({ this.setState({showSettings: !this.state.showSettings}) }, + toggleDarkMode() { + this.setState({darkMode: !this.state.darkMode}) + }, + render() { return