From 742a743a6b7f554222402abec37cfe37119428b7 Mon Sep 17 00:00:00 2001 From: Sodbileg Gansukh Date: Tue, 12 Dec 2023 12:03:43 +0700 Subject: [PATCH] Removed extra div when there's no offers to show in the settings group (#19322) --- .../src/components/settings/growth/Offers.tsx | 43 ++++++++++--------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/apps/admin-x-settings/src/components/settings/growth/Offers.tsx b/apps/admin-x-settings/src/components/settings/growth/Offers.tsx index 25ac87063c..4e03bedbaa 100644 --- a/apps/admin-x-settings/src/components/settings/growth/Offers.tsx +++ b/apps/admin-x-settings/src/components/settings/growth/Offers.tsx @@ -69,26 +69,29 @@ const Offers: React.FC<{ keywords: string[] }> = ({keywords}) => { testId='offers' title='Offers' > -
-
- {latestThree.map(offer => ())} -
- {allOffers.length > 3 &&
- {allOffers.length} offers in total -
} -
+ {latestThree.length > 0 ? +
+
+ {latestThree.map(offer => ())} +
+ {allOffers.length > 3 &&
+ {allOffers.length} offers in total +
} +
: + null + } ); };