fix(private-room): preserve payment return route
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
import {
|
||||
getFirstPaymentSearchParam,
|
||||
parsePaymentReturnSearchParams,
|
||||
parseSubscriptionReturnTo,
|
||||
type PaymentSearchParams,
|
||||
} from "@/lib/payment/payment_search_params";
|
||||
|
||||
@@ -38,7 +39,7 @@ export default async function SubscriptionPage({
|
||||
<SubscriptionScreen
|
||||
subscriptionType={subscriptionType}
|
||||
shouldResumePendingOrder={paymentReturn.shouldResumePendingOrder}
|
||||
returnTo={toReturnTo(getFirstPaymentSearchParam(query.returnTo))}
|
||||
returnTo={parseSubscriptionReturnTo(query.returnTo)}
|
||||
initialPayChannel={paymentReturn.initialPayChannel}
|
||||
analyticsContext={analyticsContext}
|
||||
/>
|
||||
@@ -48,7 +49,3 @@ export default async function SubscriptionPage({
|
||||
function toSubscriptionType(value: string | null): SubscriptionType {
|
||||
return value === "topup" ? "topup" : "vip";
|
||||
}
|
||||
|
||||
function toReturnTo(value: string | null): "chat" | null {
|
||||
return value === "chat" ? "chat" : null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user