-
{tierName}
-
{redemptionCount} redemptions
+
{}}>
+
+
+
{name}
+ {discountOffer}
+
+
+ {updatedPriceWithCurrency}
+ {originalPriceWithCurrency}
+
+
+
+ {!isTierArchived ?
+
:
+ null
+ }
-
+ {isTierArchived ?
+
This offer is disabled, because
it is tied to an archived tier.
:
+ null
+ }
);
};
@@ -144,10 +153,7 @@ export const OffersIndexModal = () => {
modal.remove();
updateRoute('');
}
- if (activeOffers.length === 0 && archivedOffers.length > 0) {
- setSelectedTab('archived');
- }
- }, [hasOffers, modal, updateRoute, activeOffers, archivedOffers, setSelectedTab]);
+ }, [hasOffers, modal, updateRoute]);
const handleOfferEdit = (id:string) => {
// TODO: implement
@@ -230,13 +236,17 @@ export const OffersIndexModal = () => {
const {discountColor, discountOffer, originalPriceWithCurrency, updatedPriceWithCurrency} = getOfferDiscount(offer.type, offer.amount, offer.cadence, offer.currency || 'USD', offerTier);
return (
-
- handleOfferEdit(offer?.id ? offer.id : '')}>{offer?.name} |
- handleOfferEdit(offer?.id ? offer.id : '')}>{offerTier.name} {getOfferCadence(offer.cadence)} |
- handleOfferEdit(offer?.id ? offer.id : '')}>{discountOffer} — {getOfferDuration(offer.duration)} |
- handleOfferEdit(offer?.id ? offer.id : '')}>{updatedPriceWithCurrency} {originalPriceWithCurrency} |
- {offer.redemption_count} |
- |
+
+ handleOfferEdit(offer?.id ? offer.id : '') : () => {}}>{offer?.name} |
+ handleOfferEdit(offer?.id ? offer.id : '') : () => {}}>{offerTier.name} {getOfferCadence(offer.cadence)} |
+ handleOfferEdit(offer?.id ? offer.id : '') : () => {}}>{discountOffer} — {getOfferDuration(offer.duration)} |
+ handleOfferEdit(offer?.id ? offer.id : '') : () => {}}>{updatedPriceWithCurrency} {originalPriceWithCurrency} |
+ {offer.redemption_count} |
+ {!isTierArchived ? : null} |
+ {isTierArchived ?
+ This offer is disabled, because
it is tied to an archived tier.
:
+ null
+ }
);
})}