From c6da87c160544603a6fc8eb873f98abc1b526a0f Mon Sep 17 00:00:00 2001 From: pbca26 Date: Fri, 14 Apr 2017 09:58:17 +0300 Subject: [PATCH] native nav bar --- react/src/components/dashboard/walletsNav.js | 21 ++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/react/src/components/dashboard/walletsNav.js b/react/src/components/dashboard/walletsNav.js index 6d409ee..b30c428 100644 --- a/react/src/components/dashboard/walletsNav.js +++ b/react/src/components/dashboard/walletsNav.js @@ -5,7 +5,8 @@ import { iguanaEdexBalance, toggleSendCoinForm, toggleReceiveCoinForm, - toggleSendReceiveCoinForms + toggleSendReceiveCoinForms, + toggleDashboardActiveSection } from '../../actions/actionCreators'; import Store from '../../store'; @@ -24,15 +25,27 @@ class WalletsNav extends React.Component { } toggleSendReceiveCoinForms() { - Store.dispatch(toggleSendReceiveCoinForms()); + if (this.props.ActiveCoin.mode === 'native') { + Store.dispatch(toggleDashboardActiveSection(this.props.ActiveCoin.nativeActiveSection === 'settings' ? 'default' : 'settings')); + } else { + Store.dispatch(toggleSendReceiveCoinForms()); + } } toggleSendCoinForm(display) { - Store.dispatch(toggleSendCoinForm(display)); + if (this.props.ActiveCoin.mode === 'native') { + Store.dispatch(toggleDashboardActiveSection(this.props.ActiveCoin.nativeActiveSection === 'send' ? 'default' : 'send')); + } else { + Store.dispatch(toggleSendCoinForm(display)); + } } toggleReceiveCoinForm(display) { - Store.dispatch(toggleReceiveCoinForm(display)); + if (this.props.ActiveCoin.mode === 'native') { + Store.dispatch(toggleDashboardActiveSection(this.props.ActiveCoin.nativeActiveSection === 'receive' ? 'default' : 'receive')); + } else { + Store.dispatch(toggleReceiveCoinForm(display)); + } } render() {