2023-01-26 11:48:30 -05:00
|
|
|
import { useTranslation } from 'react-i18next'
|
2023-02-22 08:18:36 -05:00
|
|
|
import { RecurlySubscription } from '../../../../../../types/subscription/dashboard/subscription'
|
2023-01-26 11:48:30 -05:00
|
|
|
|
2023-02-22 06:53:20 -05:00
|
|
|
type PriceExceptionsProps = {
|
2023-02-22 08:18:36 -05:00
|
|
|
subscription: RecurlySubscription
|
2023-02-22 06:53:20 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
export function PriceExceptions({ subscription }: PriceExceptionsProps) {
|
2023-01-26 11:48:30 -05:00
|
|
|
const { t } = useTranslation()
|
2023-02-22 06:53:20 -05:00
|
|
|
const { activeCoupons } = subscription.recurly
|
|
|
|
|
2023-01-26 11:48:30 -05:00
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<p>
|
|
|
|
<i>* {t('subject_to_additional_vat')}</i>
|
|
|
|
</p>
|
2023-02-22 06:53:20 -05:00
|
|
|
{activeCoupons.length > 0 && (
|
|
|
|
<>
|
2023-03-06 05:22:06 -05:00
|
|
|
<i>* {t('coupons_not_included')}:</i>
|
2023-02-22 06:53:20 -05:00
|
|
|
<ul>
|
|
|
|
{activeCoupons.map(coupon => (
|
|
|
|
<li key={coupon.id}>
|
|
|
|
<i>{coupon.description || coupon.name}</i>
|
|
|
|
</li>
|
|
|
|
))}
|
|
|
|
</ul>
|
|
|
|
</>
|
|
|
|
)}
|
2023-01-26 11:48:30 -05:00
|
|
|
</>
|
|
|
|
)
|
|
|
|
}
|