courrier refactor rebuild preview
This commit is contained in:
parent
88e03326af
commit
cb3e119a5d
@ -123,14 +123,17 @@ export default function EmailPreview({ email, loading = false, onReply }: EmailP
|
||||
hasAttachments: email.hasAttachments || false
|
||||
};
|
||||
|
||||
// Get the raw content - this is what we'd normally display directly
|
||||
// Get the raw content directly
|
||||
const rawContent = email.content || email.html || email.text || '';
|
||||
|
||||
// Log both raw and formatted content for debugging
|
||||
console.log("Raw content:", rawContent.substring(0, 200));
|
||||
// Now use the same content that would be shown in a reply
|
||||
// This is exactly what ComposeEmail shows
|
||||
const { content } = formatReplyEmail(formatterEmail, 'reply');
|
||||
|
||||
// Use the same formatters that ComposeEmail uses
|
||||
setFormattedContent(rawContent);
|
||||
console.log("Formatted content for display:", content.substring(0, 200));
|
||||
|
||||
// Use the formatted content that includes the proper structure
|
||||
setFormattedContent(content);
|
||||
} catch (error) {
|
||||
console.error('Error formatting email content:', error);
|
||||
// Fallback to raw content if formatting fails
|
||||
|
||||
Loading…
Reference in New Issue
Block a user