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
@@ -6,6 +6,7 @@
*/
import { usePaymentLaunchFlow } from "@/app/_hooks/use-payment-launch-flow";
import { PaymentLaunchDialogs } from "@/app/_components/payment/payment-launch-dialogs";
import { DEFAULT_CHARACTER_SLUG } from "@/data/constants/character";
import type { SubscriptionReturnTo } from "@/lib/navigation/subscription_exit";
import {
usePaymentDispatch,
@@ -22,12 +23,14 @@ export interface SubscriptionCheckoutButtonProps {
disabled?: boolean;
subscriptionType: "vip" | "topup";
returnTo?: SubscriptionReturnTo;
characterSlug?: string;
}
export function SubscriptionCheckoutButton({
disabled = false,
subscriptionType,
returnTo = null,
characterSlug = DEFAULT_CHARACTER_SLUG,
}: SubscriptionCheckoutButtonProps) {
const payment = usePaymentState();
const paymentDispatch = usePaymentDispatch();
@@ -37,6 +40,7 @@ export function SubscriptionCheckoutButton({
payment,
paymentDispatch,
returnTo: returnTo ?? undefined,
characterSlug,
subscriptionType,
});