feat(subscription): separate selection from payment and add issue feedback
Docker Image / Build and Push Docker Image (push) Successful in 2m2s
Docker Image / Build and Push Docker Image (push) Successful in 2m2s
(cherry picked from commit fe9d31146b)
This commit is contained in:
@@ -19,7 +19,7 @@ import { SubscriptionCtaButton } from "./subscription-cta-button";
|
||||
const log = new Logger("SubscriptionCheckoutButton");
|
||||
|
||||
export interface SubscriptionCheckoutButtonProps {
|
||||
/** 是否可用(未选套餐 / 未勾选协议 → false) */
|
||||
/** 是否可用(未选套餐或 VIP 套餐尚未确认自动续费时为 false) */
|
||||
disabled?: boolean;
|
||||
subscriptionType: "vip" | "topup";
|
||||
returnTo?: SubscriptionReturnTo;
|
||||
@@ -44,22 +44,13 @@ export function SubscriptionCheckoutButton({
|
||||
subscriptionType,
|
||||
});
|
||||
|
||||
const isLoading =
|
||||
payment.isCreatingOrder ||
|
||||
payment.isPollingOrder;
|
||||
const readyLabel =
|
||||
subscriptionType === "topup" ? "Pay and Top Up" : "Pay and Activiate";
|
||||
const agreementLabel =
|
||||
subscriptionType === "topup"
|
||||
? "Confirm the agreement and Top Up"
|
||||
: "Confirm the agreement and Activate";
|
||||
const isLoading = payment.isCreatingOrder || payment.isPollingOrder;
|
||||
const readyLabel = "Pay and Top Up";
|
||||
const label = payment.isPollingOrder
|
||||
? "Processing payment..."
|
||||
: payment.isCreatingOrder
|
||||
? "Creating order..."
|
||||
: payment.agreed
|
||||
? readyLabel
|
||||
: agreementLabel;
|
||||
? "Processing payment..."
|
||||
: payment.isCreatingOrder
|
||||
? "Creating order..."
|
||||
: readyLabel;
|
||||
|
||||
const handleClick = () => {
|
||||
if (disabled || isLoading) return;
|
||||
|
||||
Reference in New Issue
Block a user