diff --git a/src/app/subscription/components/stripe-payment-dialog.tsx b/src/app/subscription/components/stripe-payment-dialog.tsx index f0fc66ec..12c093aa 100644 --- a/src/app/subscription/components/stripe-payment-dialog.tsx +++ b/src/app/subscription/components/stripe-payment-dialog.tsx @@ -4,7 +4,8 @@ * * 后端当前返回 PaymentIntent clientSecret,因此这里直接用它完成前端确认。 */ -import { useState, type FormEvent } from "react"; +import { useEffect, useState, type FormEvent } from "react"; +import { createPortal } from "react-dom"; import { Elements, PaymentElement, @@ -35,31 +36,44 @@ export function StripePaymentDialog({ onClose, onConfirmed, }: StripePaymentDialogProps) { - if (!stripePromise) { - return ( -
- Stripe publishable key is not configured for this build. -
-+ Stripe publishable key is not configured for this build. +
+