diff --git a/app/mail/page.tsx b/app/mail/page.tsx index 2a07524..e36b361 100644 --- a/app/mail/page.tsx +++ b/app/mail/page.tsx @@ -869,7 +869,7 @@ export default function MailPage() { ); }; - // Update the email list to include the toolbar right after the header + // Keep only one renderEmailListWrapper function that includes both panels const renderEmailListWrapper = () => (
{/* Email list panel */} @@ -1141,153 +1141,6 @@ export default function MailPage() {
); - // Render the email list using sorted emails - const renderEmailListWrapper = () => ( -
- {/* Email list panel */} - {renderEmailList()} - - {/* Preview panel - will automatically take remaining space */} -
- {selectedEmail ? ( - <> - {/* Email actions header */} -
-
-
- -

- {selectedEmail.subject} -

-
-
- - - - - - -
-
-
- - {/* Scrollable content area */} - -
- - - {selectedEmail.fromName?.charAt(0) || selectedEmail.from.charAt(0)} - - -
-

- {selectedEmail.fromName || selectedEmail.from} -

-

- to {selectedEmail.to} -

-
-
- {formatDate(selectedEmail.date)} -
-
- -
- {(() => { - try { - const parsed = parseFullEmail(selectedEmail.body); - return ( -
- {/* Display HTML content if available, otherwise fallback to text */} -
- - {/* Display attachments if present */} - {parsed.attachments && parsed.attachments.length > 0 && ( -
-

Attachments

-
- {parsed.attachments.map((attachment, index) => ( -
- - - {attachment.filename} - -
- ))} -
-
- )} -
- ); - } catch (e) { - console.error('Error parsing email:', e); - return selectedEmail.body; - } - })()} -
- - - ) : ( -
- -

Select an email to view its contents

-
- )} -
-
- ); - // Render the sidebar navigation const renderSidebarNav = () => (