diff --git a/src/components/Payment/Payment.tsx b/src/components/Payment/Payment.tsx index 52eb8083d..401445990 100644 --- a/src/components/Payment/Payment.tsx +++ b/src/components/Payment/Payment.tsx @@ -50,6 +50,7 @@ const Payment = ({ const hasMoreTransactions = hiddenTransactionsCount > 0; const navigate = useNavigate(); const location = useLocation(); + const isGrantedSubscription = activeSubscription?.period === 'granted'; function onCompleteSubscriptionClick() { navigate(addQueryParam(location, 'u', 'choose-offer')); @@ -92,16 +93,18 @@ const Payment = ({
{getTitle(activeSubscription.period)}
- {activeSubscription.status === 'active' && activeSubscription.period !== 'granted'
+ {activeSubscription.status === 'active' && !isGrantedSubscription
? t('user:payment.next_billing_date_on', { date: formatDate(activeSubscription.expiresAt) })
: t('user:payment.subscription_expires_on', { date: formatDate(activeSubscription.expiresAt) })}
- {formatPrice(activeSubscription.nextPaymentPrice, activeSubscription.nextPaymentCurrency, customer.country)} - /{t(`account:periods.${activeSubscription.period}`)} -
+ {!isGrantedSubscription && ( ++ {formatPrice(activeSubscription.nextPaymentPrice, activeSubscription.nextPaymentCurrency, customer.country)} + /{t(`account:periods.${activeSubscription.period}`)} +
+ )}
{transaction.offerTitle}
- {t('user:payment.price_payed_with', {
- price: formatPrice(parseFloat(transaction.transactionPriceInclTax), transaction.transactionCurrency, transaction.customerCountry),
- method: transaction.paymentMethod,
- })}
+ {!isGrantedSubscription &&
+ t('user:payment.price_payed_with', {
+ price: formatPrice(parseFloat(transaction.transactionPriceInclTax), transaction.transactionCurrency, transaction.customerCountry),
+ method: transaction.paymentMethod,
+ })}
{transaction.transactionId}