fix(subscription): return chat paywalls after payment
This commit is contained in:
@@ -30,8 +30,14 @@ 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,
|
||||
subscription: (
|
||||
type: "vip" | "voice",
|
||||
options: { returnTo?: "chat" } = {},
|
||||
): `/subscription?${string}` => {
|
||||
const params = new URLSearchParams({ type });
|
||||
if (options.returnTo) params.set("returnTo", options.returnTo);
|
||||
return `${ROUTES.subscription}?${params.toString()}` as const;
|
||||
},
|
||||
authWithRedirect: (redirectTo: string): `/auth?redirect=${string}` =>
|
||||
`${ROUTES.auth}?redirect=${encodeURIComponent(redirectTo)}` as const,
|
||||
} as const;
|
||||
|
||||
Reference in New Issue
Block a user