feat(chat): unlock paid messages before payment
This commit is contained in:
@@ -5,7 +5,7 @@ import { useRouter } from "next/navigation";
|
||||
|
||||
import {
|
||||
consumeSubscriptionExitUrl,
|
||||
consumeSubscriptionExplicitExitUrl,
|
||||
peekSubscriptionExplicitExitUrl,
|
||||
} from "@/lib/navigation/subscription_exit";
|
||||
import {
|
||||
clearPendingPaymentOrder,
|
||||
@@ -128,7 +128,7 @@ export function useSubscriptionPaymentFlow({
|
||||
const handlePaymentSuccessClose = () => {
|
||||
setShowPaymentSuccessDialog(false);
|
||||
paymentDispatch({ type: "PaymentReset" });
|
||||
const pendingExitUrl = consumeSubscriptionExplicitExitUrl();
|
||||
const pendingExitUrl = peekSubscriptionExplicitExitUrl();
|
||||
if (pendingExitUrl) {
|
||||
router.replace(pendingExitUrl);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user