From 2bc53f2db473b99acec995ed4215e9108cc8bd7c Mon Sep 17 00:00:00 2001 From: alma Date: Wed, 16 Apr 2025 10:59:45 +0200 Subject: [PATCH] mail page ui correction 2 --- app/mail/page.tsx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/app/mail/page.tsx b/app/mail/page.tsx index 9ff73d0..576274c 100644 --- a/app/mail/page.tsx +++ b/app/mail/page.tsx @@ -34,16 +34,17 @@ interface Account { } interface Email { - id: string; + id: number; + accountId: number; from: string; - fromName?: string; + fromName: string; to: string; subject: string; body: string; date: string; read: boolean; starred: boolean; - category?: string; + category: string; } // Improved MIME Decoder Implementation for Infomaniak @@ -654,6 +655,15 @@ export default function MailPage() { setComposeBody(content); }; + const handleAccountAction = (accountId: number, action: 'edit' | 'delete') => { + setShowAccountActions(null); + if (action === 'delete') { + setDeleteType('account'); + setItemToDelete(accountId); + setShowDeleteConfirm(true); + } + }; + if (error) { return (