diff --git a/app/frontend/src/javascript/components/html-translate.tsx b/app/frontend/src/javascript/components/html-translate.tsx new file mode 100644 index 000000000..42f4cfeca --- /dev/null +++ b/app/frontend/src/javascript/components/html-translate.tsx @@ -0,0 +1,18 @@ +/** + * This component renders a translation with some HTML content. + */ +import React from 'react'; +import { useTranslation } from 'react-i18next'; + +interface HtmlTranslateProps { + trKey: string, + options?: any +} + +export const HtmlTranslate: React.FC = ({ trKey, options }) => { + const { t } = useTranslation(trKey?.split('.')[1]); + + return ( + + ); +} diff --git a/app/frontend/src/javascript/components/stripe-modal.tsx b/app/frontend/src/javascript/components/stripe-modal.tsx index 6fd52f012..e5ac1dc3b 100644 --- a/app/frontend/src/javascript/components/stripe-modal.tsx +++ b/app/frontend/src/javascript/components/stripe-modal.tsx @@ -26,6 +26,7 @@ import visaLogo from '../../../images/visa.png'; import { CartItems, PaymentConfirmation } from '../models/payment'; import WalletAPI from '../api/wallet'; import PriceAPI from '../api/price'; +import { HtmlTranslate } from './html-translate'; declare var Application: IApplication; declare var Fablab: IFablab; @@ -193,8 +194,7 @@ const StripeModal: React.FC = ({ isOpen, toggleModal, afterSuc } {isPaymentSchedule() &&
- -

{ t('app.shared.stripe.payment_schedule', { DEADLINES: schedule.items.length }) }

+
} {!submitState &&