panel 2 courrier estore
This commit is contained in:
parent
c9007f29dc
commit
b8e79ad2e7
@ -48,6 +48,7 @@ export interface Email {
|
||||
to: string;
|
||||
subject: string;
|
||||
content: string;
|
||||
body?: string; // For backward compatibility
|
||||
date: string;
|
||||
read: boolean;
|
||||
starred: boolean;
|
||||
@ -1222,7 +1223,7 @@ export default function CourrierPage() {
|
||||
</nav>
|
||||
);
|
||||
|
||||
// Update handleReply function
|
||||
// Update handleReply to include body property for backward compatibility
|
||||
const handleReply = async (type: 'reply' | 'reply-all' | 'forward') => {
|
||||
if (!selectedEmail) return;
|
||||
|
||||
@ -1245,6 +1246,12 @@ export default function CourrierPage() {
|
||||
return subject.startsWith('Re:') ? subject : `Re: ${subject}`;
|
||||
};
|
||||
|
||||
// Add body property for backward compatibility
|
||||
const emailWithBody = {
|
||||
...selectedEmail,
|
||||
body: selectedEmail.content // Add body property that maps to content
|
||||
};
|
||||
|
||||
// Set the appropriate flags
|
||||
setIsReplying(type === 'reply' || type === 'reply-all');
|
||||
setIsForwarding(type === 'forward');
|
||||
@ -1259,6 +1266,10 @@ export default function CourrierPage() {
|
||||
setShowBcc(false);
|
||||
setAttachments([]);
|
||||
|
||||
// Pass the email with both content and body properties
|
||||
setReplyToEmail(emailWithBody);
|
||||
setForwardEmail(type === 'forward' ? emailWithBody : null);
|
||||
|
||||
} catch (error) {
|
||||
console.error('Error preparing reply:', error);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user