From 0a20df65b5ff8099e10102b5bc3accd71d70934d Mon Sep 17 00:00:00 2001 From: Princi Vershwal Date: Wed, 22 Nov 2023 16:05:40 +0530 Subject: [PATCH] Added fix for no offer screen (#19092) --- .../src/components/settings/growth/offers/OffersIndex.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/admin-x-settings/src/components/settings/growth/offers/OffersIndex.tsx b/apps/admin-x-settings/src/components/settings/growth/offers/OffersIndex.tsx index 3daf92df8e..3719d91583 100644 --- a/apps/admin-x-settings/src/components/settings/growth/offers/OffersIndex.tsx +++ b/apps/admin-x-settings/src/components/settings/growth/offers/OffersIndex.tsx @@ -132,6 +132,7 @@ export const OffersIndexModal = () => { }); const {data: {tiers: allTiers} = {}} = useBrowseTiers(); const paidActiveTiers = getPaidActiveTiers(allTiers || []); + const activeOffers = allOffers.filter(offer => offer.status === 'active'); useEffect(() => { if (!hasOffers) { @@ -233,7 +234,7 @@ export const OffersIndexModal = () => { animate={false} cancelLabel='' footer={ - allOffers.length > 0 ? + activeOffers.length > 0 ?
→ Learn about offers in Ghost