From 14c0f8e12d9255941074fb1465331722cffc574d Mon Sep 17 00:00:00 2001 From: Tom Kirkpatrick Date: Fri, 21 Sep 2018 17:07:25 +0200 Subject: [PATCH] fix(wallet): hide expired toggle for empty wallet Hide the "show / hide expired" toggle for new users with no previous activity. For new users with an empty wallet it doesn't make any sense that in middle of the activity list there is a toggle button to show/hide expired requests, since we know the user has no requests. --- app/components/Activity/Activity.js | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/app/components/Activity/Activity.js b/app/components/Activity/Activity.js index 08f1a632..d988b23b 100644 --- a/app/components/Activity/Activity.js +++ b/app/components/Activity/Activity.js @@ -218,17 +218,18 @@ class Activity extends Component { ))} - {showExpiredToggle && ( -
  • -
    - {showExpiredRequests ? ( - - ) : ( - - )} -
    -
  • - )} + {showExpiredToggle && + currentActivity.length > 0 && ( +
  • +
    + {showExpiredRequests ? ( + + ) : ( + + )} +
    +
  • + )}