Skip to content

Commit

Permalink
fix: pr changes
Browse files Browse the repository at this point in the history
  • Loading branch information
borkopetrovicc committed Jun 16, 2023
1 parent ab610b9 commit 935748a
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 5 deletions.
4 changes: 3 additions & 1 deletion public/locales/en/account.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
},
"checkout": {
"applicable_tax": "Applicable tax ({{taxRate}}%)",
"card_holder_name": "Cardholder name",
"close": "Close",
"save": "Save",
"continue": "Continue",
"coupon_applied": "Your coupon code has been applied",
"coupon_discount": "Coupon discount",
Expand Down Expand Up @@ -37,6 +37,7 @@
"periods_trial_one": "You will be charged after one {{period}}.",
"periods_trial_other": "You will be charged after {{count}} {{period}}.",
"redeem_coupon": "Redeem coupon",
"save": "Save",
"start_watching": "Start watching ({{countdown}})",
"total_price": "Total",
"upgrade_error": "Failed to update subscription!",
Expand Down Expand Up @@ -95,6 +96,7 @@
"payment": {
"back_to_profile": "Back to profile",
"credit_card": "Credit card",
"edit_card": "Edit card",
"paypal": "PayPal",
"update_payment_details": "Update payment details",
"update_payment_success": "Your payment details have been updated"
Expand Down
1 change: 1 addition & 0 deletions public/locales/en/user.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
},
"payment": {
"access_granted": "access granted",
"add_card_details": "Add card details",
"annual_subscription": "Annual subscription",
"cancel_subscription": "Cancel subscription",
"card_number": "Card number",
Expand Down
3 changes: 3 additions & 0 deletions public/locales/es/account.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
},
"checkout": {
"applicable_tax": "Impuesto aplicable ({{taxRate}}%)",
"card_holder_name": "Nombre del titular de la tarjeta",
"close": "Cerrar",
"continue": "Continuar",
"coupon_applied": "Se ha aplicado tu código de cupón",
Expand Down Expand Up @@ -39,6 +40,7 @@
"periods_trial_many": "",
"periods_trial_other": "Se te cobrará después de {{count}} {{period}}.",
"redeem_coupon": "Canjear cupón",
"save": "Ahorrar",
"start_watching": "Comenzar a ver ({{countdown}})",
"total_price": "Total",
"upgrade_error": "No se pudo actualizar la suscripción!",
Expand Down Expand Up @@ -100,6 +102,7 @@
"payment": {
"back_to_profile": "Volver al perfil",
"credit_card": "Credit card",
"edit_card": "Editar tarjeta",
"paypal": "PayPal",
"update_payment_details": "Actualizar detalles de pago",
"update_payment_success": "Sus detalles de pago han sido actualizados"
Expand Down
1 change: 1 addition & 0 deletions public/locales/es/user.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
},
"payment": {
"access_granted": "acceso concedido",
"add_card_details": "Agregar detalles de la tarjeta",
"annual_subscription": "Suscripción anual",
"cancel_subscription": "Cancelar suscripción",
"card_number": "Número de tarjeta",
Expand Down
2 changes: 1 addition & 1 deletion src/components/EditCardPaymentForm/EditCardPaymentForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const EditCardPaymentForm: React.FC<Props> = ({ onCancel, setUpdatingCardDetails
<div className={styles.paymentForm}>
<div>
<TextField
label="Cardholder name"
label={t('checkout.card_holder_name')}
name="cardholderName"
value={paymentData?.values?.cardholderName}
onChange={paymentData?.handleChange}
Expand Down
2 changes: 1 addition & 1 deletion src/components/EditForm/EditCardDetailsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const EditCardDetailsForm: React.FC<Props> = ({ renderPaymentMethod, submitting,
return (
<div>
<div className={styles.title}>
<h1>t('user:payments.add_card_details')</h1>
<h1>{t('user:payment.add_card_details')}</h1>
</div>
<div>{renderPaymentMethod ? renderPaymentMethod() : null}</div>
<Button onClick={onCancel} className={styles.cancelButton} fullWidth label={t('common:confirmation_dialog.close')} />
Expand Down
2 changes: 1 addition & 1 deletion src/components/PaymentForm/PaymentForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const PaymentForm: React.FC<Props> = ({ couponCode, setUpdatingOrder }) => {
<div className={styles.paymentForm}>
<div>
<TextField
label="Cardholder name"
label={t('checkout.card_holder_name')}
name="cardholderName"
value={paymentData?.values?.cardholderName}
onChange={paymentData?.handleChange}
Expand Down
1 change: 0 additions & 1 deletion src/stores/AccountController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,6 @@ export const updateCardDetails = async ({
return await useService(async ({ subscriptionService, sandbox = true }) => {
const response = await subscriptionService?.updateCardDetails({ cardName, cardNumber, cvc, expMonth, expYear, currency }, sandbox);
const activePayment = (await subscriptionService?.getActivePayment({ sandbox, customerId })) || null;
useAccountStore.setState({ loading: true });
useAccountStore.setState({
loading: false,
activePayment,
Expand Down

0 comments on commit 935748a

Please sign in to comment.