Removed extra div when there's no offers to show in the settings group (#19322)
This commit is contained in:
parent
090c8b59da
commit
742a743a6b
@ -69,26 +69,29 @@ const Offers: React.FC<{ keywords: string[] }> = ({keywords}) => {
|
||||
testId='offers'
|
||||
title='Offers'
|
||||
>
|
||||
<div>
|
||||
<div className='grid grid-cols-1 gap-4 min-[900px]:grid-cols-3'>
|
||||
{latestThree.map(offer => (<OfferContainer
|
||||
key={offer.id}
|
||||
amount={offer.amount}
|
||||
cadence={offer.cadence}
|
||||
currency={offer.currency || 'USD'}
|
||||
goToOfferEdit={goToOfferEdit}
|
||||
offerCode={offer.code}
|
||||
offerId={offer.id}
|
||||
offerTitle={offer.name}
|
||||
redemptions={offer.redemption_count}
|
||||
tier={offer.tier}
|
||||
type={offer.type}
|
||||
/>))}
|
||||
</div>
|
||||
{allOffers.length > 3 && <div className='mt-4 border-t border-t-grey-200 pt-2'>
|
||||
<span className='text-xs text-grey-700 dark:text-grey-600'>{allOffers.length} offers in total</span>
|
||||
</div>}
|
||||
</div>
|
||||
{latestThree.length > 0 ?
|
||||
<div>
|
||||
<div className='grid grid-cols-1 gap-4 min-[900px]:grid-cols-3'>
|
||||
{latestThree.map(offer => (<OfferContainer
|
||||
key={offer.id}
|
||||
amount={offer.amount}
|
||||
cadence={offer.cadence}
|
||||
currency={offer.currency || 'USD'}
|
||||
goToOfferEdit={goToOfferEdit}
|
||||
offerCode={offer.code}
|
||||
offerId={offer.id}
|
||||
offerTitle={offer.name}
|
||||
redemptions={offer.redemption_count}
|
||||
tier={offer.tier}
|
||||
type={offer.type}
|
||||
/>))}
|
||||
</div>
|
||||
{allOffers.length > 3 && <div className='mt-4 border-t border-t-grey-200 pt-2'>
|
||||
<span className='text-xs text-grey-700 dark:text-grey-600'>{allOffers.length} offers in total</span>
|
||||
</div>}
|
||||
</div> :
|
||||
null
|
||||
}
|
||||
</TopLevelGroup>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user