From 3ca31e0b4bfa7768fa60983c6313937beec9fbcb Mon Sep 17 00:00:00 2001 From: alma Date: Mon, 21 Apr 2025 18:04:12 +0200 Subject: [PATCH] mail page fix --- app/courrier/page.tsx | 12 +++++++----- components/ComposeEmail.tsx | 3 ++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/courrier/page.tsx b/app/courrier/page.tsx index c2b0c806..20aee7e0 100644 --- a/app/courrier/page.tsx +++ b/app/courrier/page.tsx @@ -1362,7 +1362,7 @@ export default function CourrierPage() { }; // Add handleReply function - const handleReply = async (type: 'reply' | 'reply-all' | 'forward') => { + const handleReply = (type: 'reply' | 'reply-all' | 'forward') => { if (!selectedEmail) return; const getReplyTo = () => { @@ -1397,10 +1397,12 @@ export default function CourrierPage() { setComposeSubject(replyEmail.subject); setComposeBody(replyEmail.body); - // Set the content directly on the div - if (composeBodyRef.current) { - composeBodyRef.current.innerHTML = replyEmail.body; - } + // Set the content directly on the div with a slight delay to ensure the component is mounted + setTimeout(() => { + if (composeBodyRef.current) { + composeBodyRef.current.innerHTML = replyEmail.body; + } + }, 0); setComposeBcc(''); diff --git a/components/ComposeEmail.tsx b/components/ComposeEmail.tsx index c2735976..3df6750f 100644 --- a/components/ComposeEmail.tsx +++ b/components/ComposeEmail.tsx @@ -229,7 +229,8 @@ export default function ComposeEmail({ minHeight: '200px', padding: '1rem', border: '1px solid #e5e7eb', - borderRadius: '0.375rem' + borderRadius: '0.375rem', + color: '#111827' // text-gray-900 }} />