fix(chat): redirect guests to auth before image paywall

This commit is contained in:
2026-06-24 18:41:59 +08:00
parent c288148c12
commit 5aa32a4256
4 changed files with 47 additions and 12 deletions
+4
View File
@@ -30,6 +30,10 @@ export type StaticRoute = (typeof ROUTES)[keyof typeof ROUTES];
export const ROUTE_BUILDERS = {
chatDeviceId: (deviceId: string): `/chat/deviceid/${string}` =>
`/chat/deviceid/${encodeURIComponent(deviceId)}` as const,
subscription: (type: "vip" | "voice"): `/subscription?type=${string}` =>
`${ROUTES.subscription}?type=${encodeURIComponent(type)}` as const,
authWithRedirect: (redirectTo: string): `/auth?redirect=${string}` =>
`${ROUTES.auth}?redirect=${encodeURIComponent(redirectTo)}` as const,
} as const;
/** 仅未登录态可见的路由(命中后已登录用户应跳走) */