overleaf/services/web/frontend/js/features/subscription/components/shared/price-exceptions.tsx
ilkin-overleaf b52c151a6f Merge pull request #11937 from overleaf/ii-subscription-dash-coupons-ci-fixes
[web] Subscription dash fix CI issues

GitOrigin-RevId: 53e7a6ede9d0f07be1e0d1f1c6180bd1a5cecf84
2023-02-23 09:05:21 +00:00

31 lines
795 B
TypeScript

import { useTranslation } from 'react-i18next'
import { RecurlySubscription } from '../../../../../../types/subscription/dashboard/subscription'
type PriceExceptionsProps = {
subscription: RecurlySubscription
}
export function PriceExceptions({ subscription }: PriceExceptionsProps) {
const { t } = useTranslation()
const { activeCoupons } = subscription.recurly
return (
<>
<p>
<i>* {t('subject_to_additional_vat')}</i>
</p>
{activeCoupons.length > 0 && (
<>
<i>* {t('coupons_not_included')}</i>
<ul>
{activeCoupons.map(coupon => (
<li key={coupon.id}>
<i>{coupon.description || coupon.name}</i>
</li>
))}
</ul>
</>
)}
</>
)
}