0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Removed extra div when there's no offers to show in the settings group (#19322)

This commit is contained in:
Sodbileg Gansukh 2023-12-12 12:03:43 +07:00 committed by GitHub
parent 090c8b59da
commit 742a743a6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -69,6 +69,7 @@ const Offers: React.FC<{ keywords: string[] }> = ({keywords}) => {
testId='offers' testId='offers'
title='Offers' title='Offers'
> >
{latestThree.length > 0 ?
<div> <div>
<div className='grid grid-cols-1 gap-4 min-[900px]:grid-cols-3'> <div className='grid grid-cols-1 gap-4 min-[900px]:grid-cols-3'>
{latestThree.map(offer => (<OfferContainer {latestThree.map(offer => (<OfferContainer
@ -88,7 +89,9 @@ const Offers: React.FC<{ keywords: string[] }> = ({keywords}) => {
{allOffers.length > 3 && <div className='mt-4 border-t border-t-grey-200 pt-2'> {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> <span className='text-xs text-grey-700 dark:text-grey-600'>{allOffers.length} offers in total</span>
</div>} </div>}
</div> </div> :
null
}
</TopLevelGroup> </TopLevelGroup>
); );
}; };