Fixed number formatting of offer redemptions count (#19365)
fixes PROD-274 - corrected plural form of the label - added number formatting
This commit is contained in:
parent
6462f8f2ab
commit
f00b342e83
@ -5,6 +5,7 @@ import {CopyLinkButton, createRedemptionFilterUrl, getOfferDiscount} from './off
|
||||
import {Offer, useBrowseOffers} from '@tryghost/admin-x-framework/api/offers';
|
||||
import {Tier, getPaidActiveTiers, useBrowseTiers} from '@tryghost/admin-x-framework/api/tiers';
|
||||
import {checkStripeEnabled} from '@tryghost/admin-x-framework/api/settings';
|
||||
import {numberWithCommas} from '../../../utils/helpers';
|
||||
import {useGlobalData} from '../../providers/GlobalDataProvider';
|
||||
import {useRouting} from '@tryghost/admin-x-framework/routing';
|
||||
|
||||
@ -20,7 +21,7 @@ const OfferContainer: React.FC<{offerTitle: string, tier: Tier, cadence: string,
|
||||
<span className='text-grey-700'>{cadence === 'month' ? 'monthly' : 'yearly'}</span>
|
||||
</div>
|
||||
<div className='mt-2 flex items-end justify-between'>
|
||||
<a className={`text-xs text-grey-700 hover:text-black ${redemptions === 0 ? 'pointer-events-none' : 'hover:underline'}`} href={createRedemptionFilterUrl(offerId)}>{redemptions} redemptions</a>
|
||||
<a className={`text-xs text-grey-700 hover:text-black ${redemptions === 0 ? 'pointer-events-none' : 'hover:underline'}`} href={createRedemptionFilterUrl(offerId)}>{numberWithCommas(redemptions)} {redemptions === 1 ? 'redemption' : 'redemptions'}</a>
|
||||
<CopyLinkButton offerCode={offerCode} />
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user