From 80a42906aae392b2650caac8149b0ca84f56709b Mon Sep 17 00:00:00 2001 From: Elias Date: Mon, 21 Jun 2021 12:27:33 +0200 Subject: [PATCH] Hide the more info button when the rewards sidenav is closed --- .../components/rewards-card/rewards-card.styles.js | 3 ++- .../components/rewards-card/rewards-card.view.jsx | 11 ++++++++--- src/views/my-account/my-account.view.jsx | 1 + 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/views/my-account/components/rewards-card/rewards-card.styles.js b/src/views/my-account/components/rewards-card/rewards-card.styles.js index 75886692f..427284d69 100644 --- a/src/views/my-account/components/rewards-card/rewards-card.styles.js +++ b/src/views/my-account/components/rewards-card/rewards-card.styles.js @@ -14,7 +14,8 @@ const useRewardsCardStyles = createUseStyles((theme) => ({ justifyContent: 'space-between', paddingBottom: theme.spacing(1.25), marginBottom: theme.spacing(1), - color: theme.palette.grey.light + color: theme.palette.grey.light, + minHeight: 44 }, cardHeading: { [theme.breakpoints.upSm]: { diff --git a/src/views/my-account/components/rewards-card/rewards-card.view.jsx b/src/views/my-account/components/rewards-card/rewards-card.view.jsx index 70d0b0364..a627e006b 100644 --- a/src/views/my-account/components/rewards-card/rewards-card.view.jsx +++ b/src/views/my-account/components/rewards-card/rewards-card.view.jsx @@ -5,6 +5,7 @@ import { CurrencySymbol, getTokenAmountInPreferredCurrency } from '../../../../u import { getFormattedEarnedReward, getFormattedPercentage } from '../../../../utils/rewards' function RewardsCard ({ + rewardSidenav, rewardTask, earnedRewardTask, rewardPercentageTask, @@ -66,9 +67,13 @@ function RewardsCard ({

Your earnings

- + { + rewardSidenav.status === 'closed' && ( + + ) + }
{ (() => { diff --git a/src/views/my-account/my-account.view.jsx b/src/views/my-account/my-account.view.jsx index 88ffd458b..2a2a8ed8e 100644 --- a/src/views/my-account/my-account.view.jsx +++ b/src/views/my-account/my-account.view.jsx @@ -100,6 +100,7 @@ function MyAccount ({ hasRewardStarted(rewards.rewardTask.data) && (