aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/components/ProxyApp.react.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/js/components/ProxyApp.react.js')
-rw-r--r--web/src/js/components/ProxyApp.react.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/web/src/js/components/ProxyApp.react.js b/web/src/js/components/ProxyApp.react.js
index 7953d938..fc21ecd8 100644
--- a/web/src/js/components/ProxyApp.react.js
+++ b/web/src/js/components/ProxyApp.react.js
@@ -10,11 +10,23 @@ var Reports = React.createClass({
var ProxyAppMain = React.createClass({
- mixins: [SettingsMixin],
+ getInitialState(){
+ return { settings: SettingsStore.getAll() };
+ },
+ componentDidMount(){
+ SettingsStore.addListener("change", this.onSettingsChange);
+ },
+ componentWillUnmount(){
+ SettingsStore.removeListener("change", this.onSettingsChange);
+ },
+ onSettingsChange(){
+ console.log("onSettingsChange");
+ this.setState({settings: SettingsStore.getAll()});
+ },
render() {
return (
<div id="container">
- <Header/>
+ <Header settings={this.state.settings}/>
<div id="main"><this.props.activeRouteHandler/></div>
{this.state.settings.showEventLog ? <EventLog/> : null}
<Footer/>