From c243645124ed899dde548e652266a14986e9b1e3 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Fri, 3 May 2019 12:21:56 +0100 Subject: [PATCH] optimise display of rewards verification requirements --- app/src/component/customRewardCard/view.js | 5 ++++- app/src/component/rewardCard/view.js | 6 +++++- app/src/component/rewardSummary/view.js | 11 +++++++++-- app/src/page/rewards/view.js | 21 +++++++++++++++++---- 4 files changed, 35 insertions(+), 8 deletions(-) diff --git a/app/src/component/customRewardCard/view.js b/app/src/component/customRewardCard/view.js index f0b1091b..39518036 100644 --- a/app/src/component/customRewardCard/view.js +++ b/app/src/component/customRewardCard/view.js @@ -28,12 +28,15 @@ class CustomRewardCard extends React.PureComponent { } onClaimPress = () => { - const { canClaim, notify, submitRewardCode } = this.props; + const { canClaim, notify, showVerification, submitRewardCode } = this.props; const { rewardCode } = this.state; Keyboard.dismiss(); if (!canClaim) { + if (showVerification) { + showVerification(); + } notify({ message: 'Unfortunately, you are not eligible to claim this reward at this time.' }); return; } diff --git a/app/src/component/rewardCard/view.js b/app/src/component/rewardCard/view.js index 821257fe..4d96b099 100644 --- a/app/src/component/rewardCard/view.js +++ b/app/src/component/rewardCard/view.js @@ -44,10 +44,14 @@ class RewardCard extends React.PureComponent { canClaim, claimReward, notify, - reward + reward, + showVerification } = this.props; if (!canClaim) { + if (showVerification) { + showVerification(); + } notify({ message: 'Unfortunately, you are not eligible to claim this reward at this time.' }); return; } diff --git a/app/src/component/rewardSummary/view.js b/app/src/component/rewardSummary/view.js index e7edcefa..3673309f 100644 --- a/app/src/component/rewardSummary/view.js +++ b/app/src/component/rewardSummary/view.js @@ -44,6 +44,13 @@ class RewardSummary extends React.Component { }); } + handleSummaryPressed = () => { + const { showVerification } = this.props; + if (showVerification) { + showVerification(); + } + } + render() { const { fetching, navigation, unclaimedRewardAmount, user } = this.props; @@ -59,7 +66,7 @@ class RewardSummary extends React.Component { } return ( - + @@ -67,7 +74,7 @@ class RewardSummary extends React.Component {