refactor(routes): move shared pages to global scope
This commit is contained in:
@@ -19,7 +19,7 @@ export interface UseSubscriptionPaymentFlowInput {
|
||||
shouldResumePendingOrder: boolean;
|
||||
returnTo: SubscriptionReturnTo;
|
||||
initialPayChannel: PayChannel;
|
||||
characterSlug?: string;
|
||||
sourceCharacterSlug?: string;
|
||||
}
|
||||
|
||||
export function useSubscriptionPaymentFlow({
|
||||
@@ -27,7 +27,7 @@ export function useSubscriptionPaymentFlow({
|
||||
shouldResumePendingOrder,
|
||||
returnTo,
|
||||
initialPayChannel,
|
||||
characterSlug = DEFAULT_CHARACTER_SLUG,
|
||||
sourceCharacterSlug = DEFAULT_CHARACTER_SLUG,
|
||||
}: UseSubscriptionPaymentFlowInput) {
|
||||
const router = useRouter();
|
||||
const { payment, paymentDispatch } = usePaymentRouteFlow({
|
||||
@@ -50,7 +50,7 @@ export function useSubscriptionPaymentFlow({
|
||||
const handleBackClick = () => {
|
||||
void (async () => {
|
||||
router.replace(
|
||||
await consumeSubscriptionExitUrl(returnTo, characterSlug),
|
||||
await consumeSubscriptionExitUrl(returnTo, sourceCharacterSlug),
|
||||
);
|
||||
})();
|
||||
};
|
||||
@@ -60,7 +60,10 @@ export function useSubscriptionPaymentFlow({
|
||||
paymentDispatch({ type: "PaymentReset" });
|
||||
void (async () => {
|
||||
router.replace(
|
||||
await resolveSubscriptionSuccessExitUrl(returnTo, characterSlug),
|
||||
await resolveSubscriptionSuccessExitUrl(
|
||||
returnTo,
|
||||
sourceCharacterSlug,
|
||||
),
|
||||
);
|
||||
})();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user