From d3e57d44a45460b577ef68837179bd05a0607be6 Mon Sep 17 00:00:00 2001 From: alma Date: Mon, 21 Apr 2025 21:10:28 +0200 Subject: [PATCH] mail page fix design --- app/courrier/page.tsx | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/app/courrier/page.tsx b/app/courrier/page.tsx index b1647b2e..46711f7d 100644 --- a/app/courrier/page.tsx +++ b/app/courrier/page.tsx @@ -1413,10 +1413,6 @@ export default function CourrierPage() { const handleReply = (type: 'reply' | 'reply-all' | 'forward') => { if (!selectedEmail) return; - // Phase 1: Format the original email content - const originalContent = getReplyBody(selectedEmail, type); - - // Phase 2: Set up the composition interface const getReplyTo = () => { if (type === 'forward') return ''; return selectedEmail.from; @@ -1435,11 +1431,14 @@ export default function CourrierPage() { return subject.startsWith('Re:') ? subject : `Re: ${subject}`; }; + // Get the formatted original email content + const originalContent = getReplyBody(selectedEmail, type); + // Update the compose form with the reply content setComposeTo(getReplyTo()); setComposeCc(getReplyCc()); setComposeSubject(getReplySubject()); - setComposeBody(''); // Start with empty body for new content + setComposeBody(originalContent); // Set the formatted content instead of empty string setComposeBcc(''); // Show the compose form and CC field for Reply All @@ -1447,12 +1446,6 @@ export default function CourrierPage() { setShowCc(type === 'reply-all'); setShowBcc(false); setAttachments([]); - - // Pass the formatted original email content to the compose modal - setOriginalEmail({ - content: originalContent, - type - }); }; // Add the confirmation dialog component