From ee8c411c4ebe614159585a611603574554851610 Mon Sep 17 00:00:00 2001 From: Daniel Ternyak Date: Sun, 11 Jun 2017 20:08:19 -0500 Subject: [PATCH 1/3] Remove comments. --- common/containers/App/index.jsx | 4 +--- .../components/GenerateWalletPasswordInputComponent.jsx | 8 -------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/common/containers/App/index.jsx b/common/containers/App/index.jsx index 1a657da1..a018c1bf 100644 --- a/common/containers/App/index.jsx +++ b/common/containers/App/index.jsx @@ -41,9 +41,7 @@ class App extends Component { changeNode, nodeSelection } = this.props; - - // let title = children.props.route.name; - + let headerProps = { changeLanguage, languageSelection, diff --git a/common/containers/Tabs/GenerateWallet/components/GenerateWalletPasswordInputComponent.jsx b/common/containers/Tabs/GenerateWallet/components/GenerateWalletPasswordInputComponent.jsx index 6c7ca791..2e23001e 100644 --- a/common/containers/Tabs/GenerateWallet/components/GenerateWalletPasswordInputComponent.jsx +++ b/common/containers/Tabs/GenerateWallet/components/GenerateWalletPasswordInputComponent.jsx @@ -33,14 +33,6 @@ export default class GenerateWalletPasswordInputComponent extends Component { className="input-group-addon eye"/> - - {/*TODO - if we want descriptive errors we could re-enable this*/} - {/*{this.props.meta.touched && this.props.meta.error &&*/} - {/*
*/} - {/*

{this.props.meta.error}

*/} - {/*
*/} - {/*}*/} - ) } From df3ddd735115a7c1d581739d20105bfe3b263c77 Mon Sep 17 00:00:00 2001 From: Daniel Ternyak Date: Sun, 11 Jun 2017 20:08:48 -0500 Subject: [PATCH 2/3] Add swap link; fix activeOrNot nav option selection. --- common/components/Header/components/TabsOptions.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/components/Header/components/TabsOptions.jsx b/common/components/Header/components/TabsOptions.jsx index dbc2c279..1c684943 100644 --- a/common/components/Header/components/TabsOptions.jsx +++ b/common/components/Header/components/TabsOptions.jsx @@ -11,7 +11,8 @@ const tabs = [ name: 'NAV_SendEther' }, { - name: 'NAV_Swap' + name: 'NAV_Swap', + link: 'swap' }, { name: 'NAV_Offline' @@ -62,7 +63,7 @@ export default class TabsOptions extends Component { { tabs.map((object, i) => { // if the window pathname is the same or similar to the tab objects name, set the active toggle - const activeOrNot = (window.location.pathname === object.name || window.location.pathname.substring(1) === object.name) ? 'active' : ''; + const activeOrNot = (window.location.pathname === object.link || window.location.pathname.substring(1) === object.link) ? 'active' : ''; return (
  • From 8e530fe47666529dc530a042694a816de201b595 Mon Sep 17 00:00:00 2001 From: Daniel Ternyak Date: Sun, 18 Jun 2017 14:56:12 -0500 Subject: [PATCH 3/3] use props.location instead of window --- common/components/Header/components/TabsOptions.jsx | 8 +++++++- common/components/Header/index.jsx | 4 +++- common/containers/App/index.jsx | 3 ++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/common/components/Header/components/TabsOptions.jsx b/common/components/Header/components/TabsOptions.jsx index 1c684943..dada34d9 100644 --- a/common/components/Header/components/TabsOptions.jsx +++ b/common/components/Header/components/TabsOptions.jsx @@ -1,6 +1,7 @@ import React, {Component} from 'react'; import {Link} from 'react-router'; import translate from 'translations'; +import PropTypes from 'prop-types'; const tabs = [ { @@ -40,6 +41,10 @@ export default class TabsOptions extends Component { } } + static propTypes = { + location: PropTypes.object + }; + tabClick() { } @@ -50,6 +55,7 @@ export default class TabsOptions extends Component { } render() { + const {location} = this.props; return (
    ); diff --git a/common/containers/App/index.jsx b/common/containers/App/index.jsx index a018c1bf..80146f2e 100644 --- a/common/containers/App/index.jsx +++ b/common/containers/App/index.jsx @@ -41,8 +41,9 @@ class App extends Component { changeNode, nodeSelection } = this.props; - + let headerProps = { + location, changeLanguage, languageSelection,