From 6a4b9c118f799ac8f57e8002eb6c967663ffe316 Mon Sep 17 00:00:00 2001 From: Joe Thomas Date: Wed, 29 Jun 2016 23:25:24 -0700 Subject: [PATCH] Clean up leftover mode toggling code in NavBarNew.js --- js/NavBarNew.js | 10 ---------- js/index.js | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/js/NavBarNew.js b/js/NavBarNew.js index 98e1fba..09ed00f 100644 --- a/js/NavBarNew.js +++ b/js/NavBarNew.js @@ -35,13 +35,6 @@ var NavBarNew = React.createClass({ showModal: false, } }, - getModeName: function (name) { - return {'research_mode': 'Research Pages', 'default': 'Default Mode'}[name] - }, - toggleMode: function () { - this.props.toggleMode(); - this.setState({ showModal: false }); - }, shouldComponentUpdate: function (nextProps, nextState) { // Only rerender if path has change or the research mode changes, ignoring query. var d3TipDiv = document.getElementsByClassName('d3-tip-selection'); @@ -51,7 +44,6 @@ var NavBarNew = React.createClass({ } return this.props.mode !== nextProps.mode || this.state.loggedin !== nextState.loggedin || - this.state.showModal !== nextState.showModal || this.props.path.split(/\?/)[0] !== nextProps.path.split(/\?/)[0]; }, activePath: function (path, tab) { @@ -68,8 +60,6 @@ var NavBarNew = React.createClass({ {this.props.mode === 'research_mode' && Research} ); - var mode_name = this.getModeName(this.props.mode); - var other_mode = (this.props.mode === 'research_mode') ? 'default' : 'research_mode'; return (
diff --git a/js/index.js b/js/index.js index a452443..3e2546b 100644 --- a/js/index.js +++ b/js/index.js @@ -472,7 +472,7 @@ var Application = React.createClass({ var path = this.getPath().slice(1); return (
- +