overleaf/services/web/frontend/js/features/subscription/components/shared/price-exceptions.tsx
Alexandre Bourdin a928fd20e6 Merge pull request #11906 from overleaf/ii-react-subscription-dash-active-coupons
[web] Subscription dash show active coupons react migration

GitOrigin-RevId: 7a63505b31d828491b6ea812482376882354b4ee
2023-02-23 09:04:13 +00:00

31 lines
781 B
TypeScript

import { useTranslation } from 'react-i18next'
import { Subscription } from '../../../../../../types/subscription/dashboard/subscription'
type PriceExceptionsProps = {
subscription: Subscription
}
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>
</>
)}
</>
)
}