feat(characters): use local character catalog

This commit is contained in:
2026-07-17 16:03:18 +08:00
parent a210a98d98
commit b3ebd5cf3b
96 changed files with 1023 additions and 522 deletions
@@ -37,6 +37,7 @@ export interface UsePaymentLaunchFlowInput {
payment: PaymentContextState;
paymentDispatch: Dispatch<PaymentEvent>;
returnTo?: PendingPaymentReturnTo;
characterSlug?: string;
subscriptionType: PendingPaymentSubscriptionType;
tipCoffeeType?: PendingPaymentTipCoffeeType;
}
@@ -107,6 +108,7 @@ export function usePaymentLaunchFlow({
payment,
paymentDispatch,
returnTo,
characterSlug,
subscriptionType,
tipCoffeeType,
}: UsePaymentLaunchFlowInput): PaymentLaunchFlow {
@@ -153,6 +155,7 @@ export function usePaymentLaunchFlow({
subscriptionType,
...(tipCoffeeType ? { tipCoffeeType } : {}),
...(returnTo ? { returnTo } : {}),
...(characterSlug ? { characterSlug } : {}),
onOpened: () => trackPaymentCheckoutOpened(payment, paymentUrl),
onFailed: (errorMessage) => {
trackPaymentCheckoutFailed(payment, "payment_redirect_failed");
@@ -183,6 +186,7 @@ export function usePaymentLaunchFlow({
}, [
log,
logScope,
characterSlug,
payment.currentOrderId,
payment,
payment.launchNonce,
@@ -236,6 +240,7 @@ export function usePaymentLaunchFlow({
subscriptionType,
...(tipCoffeeType ? { tipCoffeeType } : {}),
...(returnTo ? { returnTo } : {}),
...(characterSlug ? { characterSlug } : {}),
onOpened: () => trackPaymentCheckoutOpened(payment, ezpayPaymentUrl),
onFailed: (errorMessage) => {
trackPaymentCheckoutFailed(payment, "payment_redirect_failed");