From 7f54c02a1ced81fc91ed957b7fda8ca25f565351 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Tue, 22 Jan 2019 14:29:59 +0100 Subject: [PATCH] make the claim custom reward card always visible --- app/src/page/rewards/view.js | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/app/src/page/rewards/view.js b/app/src/page/rewards/view.js index 053d179e..82e7b825 100644 --- a/app/src/page/rewards/view.js +++ b/app/src/page/rewards/view.js @@ -92,6 +92,7 @@ class RewardsPage extends React.PureComponent { renderUnclaimedRewards() { const { claimed, fetching, rewards, user } = this.props; + const unclaimedRewards = (rewards && rewards.length) ? rewards : []; if (fetching) { return ( @@ -106,25 +107,15 @@ class RewardsPage extends React.PureComponent { This app is unable to earn rewards due to an authentication failure. ); - } else if (!rewards || rewards.length <= 0) { - return ( - - - {(claimed && claimed.length) ? - "You have claimed all available rewards! We're regularly adding more so be sure to check back later." : - "There are no rewards available at this time, please check back later."} - - - ); } const isNotEligible = !user || !user.primary_email || !user.has_verified_email || !user.is_reward_approved; return ( - {rewards.map(reward => )} + {unclaimedRewards.map(reward => )} );