@@ -170,6 +134,7 @@ function PaymentModal({ activeSubscriptionPlan, noTrial, returnUrl }: IPaymentMo
Choose payment method
@@ -180,7 +145,8 @@ function PaymentModal({ activeSubscriptionPlan, noTrial, returnUrl }: IPaymentMo
You will be charged only{" "}
- ${getPriceFromTrial(activeSubPlan?.trial)} for your 3-day trial.
+ ${getPriceFromTrial(activeSubPlan?.trial)} for your 3-day
+ trial.
@@ -197,26 +163,23 @@ function PaymentModal({ activeSubscriptionPlan, noTrial, returnUrl }: IPaymentMo
{stripePromise && clientSecret && (
- {selectedPaymentMethod === EPaymentMethod.PAYPAL_OR_APPLE_PAY && (
+ {selectedPaymentMethod === EPaymentMethod.PAYMENT_BUTTONS && (
- {payPalSubPlan && (
-
- )}
- {!!errors.length &&
{errors}
}
)}
{selectedPaymentMethod === EPaymentMethod.CREDIT_CARD && (
-
+
)}
)}
diff --git a/src/components/ui/PaymentMethodsButtons/PayPayOrApplePay/index.tsx b/src/components/ui/PaymentMethodsButtons/PaymentButtons/index.tsx
similarity index 58%
rename from src/components/ui/PaymentMethodsButtons/PayPayOrApplePay/index.tsx
rename to src/components/ui/PaymentMethodsButtons/PaymentButtons/index.tsx
index 9b9b4b1..dd1721a 100644
--- a/src/components/ui/PaymentMethodsButtons/PayPayOrApplePay/index.tsx
+++ b/src/components/ui/PaymentMethodsButtons/PaymentButtons/index.tsx
@@ -1,10 +1,9 @@
import styles from "./styles.module.css";
-function PayPalOrApplePay() {
+function PaymentButtons() {
return
-
;
}
-export default PayPalOrApplePay;
+export default PaymentButtons;
diff --git a/src/components/ui/PaymentMethodsButtons/PayPayOrApplePay/styles.module.css b/src/components/ui/PaymentMethodsButtons/PaymentButtons/styles.module.css
similarity index 100%
rename from src/components/ui/PaymentMethodsButtons/PayPayOrApplePay/styles.module.css
rename to src/components/ui/PaymentMethodsButtons/PaymentButtons/styles.module.css
diff --git a/src/data/paymentMethods.tsx b/src/data/paymentMethods.tsx
index bafe93a..5428dc2 100644
--- a/src/data/paymentMethods.tsx
+++ b/src/data/paymentMethods.tsx
@@ -1,20 +1,20 @@
import CreditCard from "@/components/ui/PaymentMethodsButtons/CreditCard";
-import PayPalOrApplePay from "@/components/ui/PaymentMethodsButtons/PayPayOrApplePay";
+import PaymentButtons from "@/components/ui/PaymentMethodsButtons/PaymentButtons";
export enum EPaymentMethod {
CREDIT_CARD = "card",
- PAYPAL_OR_APPLE_PAY = "payPalOrApplePay",
+ PAYMENT_BUTTONS = "paymentButtons",
}
-interface IPaymentMethod {
+export interface IPaymentMethod {
id: EPaymentMethod;
component: JSX.Element;
}
export const paymentMethods: IPaymentMethod[] = [
{
- id: EPaymentMethod.PAYPAL_OR_APPLE_PAY,
- component:
,
+ id: EPaymentMethod.PAYMENT_BUTTONS,
+ component:
,
},
{
id: EPaymentMethod.CREDIT_CARD,