feat(app): improve payment and paywall UX
This commit is contained in:
@@ -89,6 +89,9 @@ export function sendResponseToUiMessage(response: ChatSendResponse): UiMessage {
|
||||
isFromAI: true,
|
||||
date: todayString(new Date(response.timestamp)),
|
||||
...(response.imageUrl ? { imageUrl: response.imageUrl } : {}),
|
||||
...(response.showUpgrade && response.imageUrl
|
||||
? { imagePaywalled: true }
|
||||
: {}),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -147,8 +150,8 @@ export function applyHttpSendOutput(
|
||||
return {
|
||||
messages: [...context.messages, reply],
|
||||
isReplyingAI: false,
|
||||
paywallTriggered: true,
|
||||
paywallReason: "photo_paywall",
|
||||
paywallTriggered: false,
|
||||
paywallReason: null,
|
||||
paywallDetail: null,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user