From 685d8b4a2fb5c16120bb536fa48623c953ef1ef3 Mon Sep 17 00:00:00 2001 From: alma Date: Sun, 27 Apr 2025 00:29:51 +0200 Subject: [PATCH] courrier refactor rebuild preview --- components/email/EmailPreview.tsx | 35 +++++++++++++++++-------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/components/email/EmailPreview.tsx b/components/email/EmailPreview.tsx index 4e58345e..4db3c614 100644 --- a/components/email/EmailPreview.tsx +++ b/components/email/EmailPreview.tsx @@ -119,7 +119,7 @@ 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 the approach in ComposeEmail + // Use the same sanitization approach as in ComposeEmail const sanitizedContent = sanitizeHtml(email.content || email.html || email.text || ''); return ( @@ -199,25 +199,28 @@ export default function EmailPreview({ email, loading = false, onReply }: EmailP )} - {/* Email content */} + {/* Email content - updated to match ComposeEmail */}
{email.content ? (
+ className="border rounded-md overflow-hidden" + style={{ minHeight: '300px' }} + > +
+
) : (

No content available

)}