From 8f4f013ed22d9285b7eb09d284d56d1033e8eb39 Mon Sep 17 00:00:00 2001 From: Sodbileg Gansukh Date: Thu, 18 Jan 2024 15:24:28 +0700 Subject: [PATCH] Design details on Offers cards and list (#19513) --- .../src/components/settings/growth/Offers.tsx | 4 ++-- .../src/components/settings/growth/offers/OffersIndex.tsx | 6 +++--- 2 files changed, 5 insertions(+), 5 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 69e26bbfe2..7006e78f05 100644 --- a/apps/admin-x-settings/src/components/settings/growth/Offers.tsx +++ b/apps/admin-x-settings/src/components/settings/growth/Offers.tsx @@ -11,11 +11,11 @@ import {useRouting} from '@tryghost/admin-x-framework/routing'; const OfferContainer: React.FC<{offerTitle: string, tier: Tier, cadence: string, redemptions: number, type: string, amount: number, currency: string, offerId: string, offerCode: string, goToOfferEdit: (offerId: string) => void}> = ( {offerTitle, tier, cadence, redemptions, type, amount, currency, offerId, offerCode, goToOfferEdit}) => { - const {discountColor, discountOffer} = getOfferDiscount(type, amount, cadence, currency || 'USD', tier); + const {discountOffer} = getOfferDiscount(type, amount, cadence, currency || 'USD', tier); return
goToOfferEdit(offerId)}> {offerTitle}
- {discountOffer} + {discountOffer}
{tier.name} {cadence === 'month' ? 'monthly' : 'yearly'} 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 294d83d48b..b581bef775 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 @@ -176,13 +176,13 @@ export const OffersIndexModal = () => { const isTierArchived = offerTier?.active === false; - const {discountColor, discountOffer, originalPriceWithCurrency, updatedPriceWithCurrency} = getOfferDiscount(offer.type, offer.amount, offer.cadence, offer.currency || 'USD', offerTier); + const {discountOffer, originalPriceWithCurrency, updatedPriceWithCurrency} = getOfferDiscount(offer.type, offer.amount, offer.cadence, offer.currency || 'USD', offerTier); return ( handleOfferEdit(offer?.id ? offer.id : '') : () => {}}>{offer?.name}
{offerTier.name} {getOfferCadence(offer.cadence)}
- handleOfferEdit(offer?.id ? offer.id : '') : () => {}}>{discountOffer}{offer.type !== 'trial' ? <>
{getOfferDuration(offer.duration)} : null}
- handleOfferEdit(offer?.id ? offer.id : '') : () => {}}>{updatedPriceWithCurrency} {originalPriceWithCurrency} + handleOfferEdit(offer?.id ? offer.id : '') : () => {}}>{discountOffer}
{offer.type !== 'trial' ? getOfferDuration(offer.duration) : 'Trial period'}
+ handleOfferEdit(offer?.id ? offer.id : '') : () => {}}>{updatedPriceWithCurrency} {offer.type !== 'trial' ? {originalPriceWithCurrency} : null} 0 ? createRedemptionFilterUrl(offer.id ? offer.id : '') : undefined} onClick={offer.redemption_count === 0 ? !isTierArchived ? () => handleOfferEdit(offer?.id ? offer.id : '') : () => {} : () => {}}>{offer.redemption_count} {!isTierArchived ? : null} {isTierArchived ?