fix(chat): add voice unlock payment choices
This commit is contained in:
@@ -29,6 +29,7 @@ export interface ChatAreaProps {
|
||||
unlockingPrivateMessageId?: string | null;
|
||||
onUnlockPrivateMessage?: (messageId: string) => void;
|
||||
onUnlockImagePaywall?: () => void;
|
||||
onUnlockVoiceMessage?: () => void;
|
||||
}
|
||||
|
||||
export function ChatArea({
|
||||
@@ -37,6 +38,7 @@ export function ChatArea({
|
||||
unlockingPrivateMessageId,
|
||||
onUnlockPrivateMessage,
|
||||
onUnlockImagePaywall,
|
||||
onUnlockVoiceMessage,
|
||||
}: ChatAreaProps) {
|
||||
const scrollRef = useRef<HTMLDivElement>(null);
|
||||
const prevLengthRef = useRef(messages.length);
|
||||
@@ -61,6 +63,7 @@ export function ChatArea({
|
||||
unlockingPrivateMessageId,
|
||||
onUnlockPrivateMessage,
|
||||
onUnlockImagePaywall,
|
||||
onUnlockVoiceMessage,
|
||||
)}
|
||||
|
||||
{isReplyingAI && <LottieMessageBubble />}
|
||||
@@ -74,6 +77,7 @@ function renderMessagesWithDateHeaders(
|
||||
unlockingPrivateMessageId?: string | null,
|
||||
onUnlockPrivateMessage?: (messageId: string) => void,
|
||||
onUnlockImagePaywall?: () => void,
|
||||
onUnlockVoiceMessage?: () => void,
|
||||
) {
|
||||
const items: Array<{ type: "date"; date: string; key: string } | { type: "msg"; message: UiMessage; key: string }> = [];
|
||||
|
||||
@@ -106,6 +110,7 @@ function renderMessagesWithDateHeaders(
|
||||
}
|
||||
onUnlockPrivateMessage={onUnlockPrivateMessage}
|
||||
onUnlockImagePaywall={onUnlockImagePaywall}
|
||||
onUnlockVoiceMessage={onUnlockVoiceMessage}
|
||||
/>
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user