From 15e272132704099ad7cf561b4b5ca7eedfcda36d Mon Sep 17 00:00:00 2001 From: zuies Date: Wed, 28 Jun 2023 19:30:59 +0400 Subject: [PATCH] hide button while there is no record to show in the table --- .../activeMembers/ActiveMemberBreakdown.tsx | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/components/pages/statistics/memberBreakdowns/activeMembers/ActiveMemberBreakdown.tsx b/src/components/pages/statistics/memberBreakdowns/activeMembers/ActiveMemberBreakdown.tsx index 11bf18ce..94d627c6 100644 --- a/src/components/pages/statistics/memberBreakdowns/activeMembers/ActiveMemberBreakdown.tsx +++ b/src/components/pages/statistics/memberBreakdowns/activeMembers/ActiveMemberBreakdown.tsx @@ -84,7 +84,7 @@ export default function ActiveMemberBreakdown() { return ( <> -
+

Members breakdown

@@ -124,15 +124,17 @@ export default function ActiveMemberBreakdown() {
-
- toggleExpanded(!isExpanded)} - /> -
+ {fetchedData?.results.length > 0 ?? ( +
+ toggleExpanded(!isExpanded)} + /> +
+ )} ); }