price-exceptions.tsx 796 B

12345678910111213141516171819202122232425262728293031
  1. import { useTranslation } from 'react-i18next'
  2. import { RecurlySubscription } from '../../../../../../types/subscription/dashboard/subscription'
  3. type PriceExceptionsProps = {
  4. subscription: RecurlySubscription
  5. }
  6. export function PriceExceptions({ subscription }: PriceExceptionsProps) {
  7. const { t } = useTranslation()
  8. const { activeCoupons } = subscription.recurly
  9. return (
  10. <>
  11. <p>
  12. <i>* {t('subject_to_additional_vat')}</i>
  13. </p>
  14. {activeCoupons.length > 0 && (
  15. <>
  16. <i>* {t('coupons_not_included')}:</i>
  17. <ul>
  18. {activeCoupons.map(coupon => (
  19. <li key={coupon.id}>
  20. <i>{coupon.description || coupon.name}</i>
  21. </li>
  22. ))}
  23. </ul>
  24. </>
  25. )}
  26. </>
  27. )
  28. }