From 0f7fcf350e2951500fea4d6d0de9b7440abaf324 Mon Sep 17 00:00:00 2001 From: Emilio Silva Schlenker Date: Thu, 14 Mar 2019 10:14:04 -0300 Subject: [PATCH] Mobile view (#78) * The Tip component is called with the appropiate parameters from inside the mobile view, so that it renders correctly. * The Watcher object is initiated as soon as the Tip component is loaded in case it has the active tab. This didn't happen before as the tab navigation allowed it to start after the component was loaded. --- src/pages/Dashboard/components/Tip.js | 3 +++ src/pages/Dashboard/mobile.view.js | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pages/Dashboard/components/Tip.js b/src/pages/Dashboard/components/Tip.js index 0dddb2c..6d25628 100644 --- a/src/pages/Dashboard/components/Tip.js +++ b/src/pages/Dashboard/components/Tip.js @@ -56,6 +56,9 @@ class Tip extends Component { store.fetch.pos().subscribe(async result => { const posAddress = result.data.pos.address; this.setState({ posAddress }); + if(this.props.active) { + this.startWatcher(); + } }); } diff --git a/src/pages/Dashboard/mobile.view.js b/src/pages/Dashboard/mobile.view.js index 18d045f..a4f3ab0 100644 --- a/src/pages/Dashboard/mobile.view.js +++ b/src/pages/Dashboard/mobile.view.js @@ -36,7 +36,10 @@ export default function() { )} {activeTab === 'recentPayments' && } - {activeTab === 'tip' && } + ) : (
Pos address is empty