From a987da9bfe74ae7b32ec53c9b680c5b93c540d06 Mon Sep 17 00:00:00 2001 From: chenhang Date: Wed, 24 Jun 2026 18:47:10 +0800 Subject: [PATCH] fix(chat): redirect guests before quota upgrade --- src/app/chat/chat-screen.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app/chat/chat-screen.tsx b/src/app/chat/chat-screen.tsx index 610d798f..bdf43ed1 100644 --- a/src/app/chat/chat-screen.tsx +++ b/src/app/chat/chat-screen.tsx @@ -49,7 +49,6 @@ export function ChatScreen() { const showMessageLimitBanner = state.upgradePromptVisible && state.upgradeReason === "daily_limit"; const messageLimitTitle = "The limit for free chat times\nhas been reached"; - const messageLimitCta = isGuest ? "Log in to continue chatting" : undefined; const showPrivatePaywallBanner = state.upgradePromptVisible && state.upgradeReason === "private_message"; @@ -142,11 +141,12 @@ export function ChatScreen() { } function handleMessageLimitUnlock(): void { + const subscriptionUrl = ROUTE_BUILDERS.subscription("vip"); if (isGuest) { - router.push(ROUTES.auth); + router.push(ROUTE_BUILDERS.authWithRedirect(subscriptionUrl)); return; } - router.push(ROUTE_BUILDERS.subscription("vip")); + router.push(subscriptionUrl); } return ( @@ -186,7 +186,6 @@ export function ChatScreen() { {showMessageLimitBanner ? ( ) : (