fix(chat): hide voice message transcript
This commit is contained in:
@@ -81,7 +81,6 @@ export function MessageContent({
|
||||
{hasAudio && audioUrl ? (
|
||||
<VoiceBubble
|
||||
audioUrl={audioUrl}
|
||||
content={content}
|
||||
isFromAI={isFromAI}
|
||||
/>
|
||||
) : null}
|
||||
|
||||
@@ -96,14 +96,6 @@
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.text {
|
||||
margin: 0;
|
||||
font-size: var(--font-size-md, 14px);
|
||||
line-height: 1.45;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.error {
|
||||
margin: 0;
|
||||
color: var(--color-error, #ff4d4f);
|
||||
|
||||
@@ -7,13 +7,11 @@ import styles from "./voice-bubble.module.css";
|
||||
|
||||
export interface VoiceBubbleProps {
|
||||
audioUrl: string;
|
||||
content?: string;
|
||||
isFromAI: boolean;
|
||||
}
|
||||
|
||||
export function VoiceBubble({
|
||||
audioUrl,
|
||||
content = "",
|
||||
isFromAI,
|
||||
}: VoiceBubbleProps) {
|
||||
const audioRef = useRef<HTMLAudioElement>(null);
|
||||
@@ -82,7 +80,6 @@ export function VoiceBubble({
|
||||
<span />
|
||||
<span />
|
||||
</div>
|
||||
{content.length > 0 ? <p className={styles.text}>{content}</p> : null}
|
||||
{hasError ? (
|
||||
<p className={styles.error}>Voice message failed to load.</p>
|
||||
) : null}
|
||||
|
||||
Reference in New Issue
Block a user