courrier refactor rebuild preview

This commit is contained in:
alma 2025-04-27 00:35:31 +02:00
parent bf7b02b903
commit 034cf6da23

View File

@ -122,8 +122,11 @@ export default function EmailPreview({ email, loading = false, onReply }: EmailP
const sender = email.from && email.from.length > 0 ? email.from[0] : undefined;
// Use sanitizeHtml directly, matching ComposeEmail exactly
const emailContent = sanitizeHtml(email.content || email.html || email.text || '');
// Enable debugging to see what content is coming in
console.log("Email content in preview:", email.content);
// Use the exact same approach for content as in ComposeEmail - no custom sanitization
const emailContent = email.content || email.html || email.text || '';
return (
<Card className="flex flex-col h-full overflow-hidden border-0 shadow-none">
@ -202,7 +205,7 @@ export default function EmailPreview({ email, loading = false, onReply }: EmailP
)}
</div>
{/* Email content - EXACT copy from ComposeEmail */}
{/* Email content - debuggable version */}
<ScrollArea className="flex-1">
<div className="space-y-2 p-6">
<div className="border rounded-md overflow-hidden">