diff --git a/app/mail/page.tsx b/app/mail/page.tsx index 2ffa285..656bb8f 100644 --- a/app/mail/page.tsx +++ b/app/mail/page.tsx @@ -909,7 +909,6 @@ export default function MailPage() { } return ( - <>
{/* Sidebar */}
{/* Compose button */} -
+
- {/* Accounts Section */} -
- - - {accountsDropdownOpen && ( -
- {accounts.map(account => ( - + + {accountsDropdownOpen && ( +
+ {accounts.map(account => ( + - ))} -
- )} -
+ ))} +
+ )} +
- {/* Navigation */} -
- {/* Main content area */} + {/* Main content */}
{/* Email list */}
- {/* Email list header */}
- {emails.length > 0 && ( - 0 && ( + )}

@@ -1080,81 +1078,57 @@ export default function MailPage() {

- {emails.length} emails + {filteredEmails.length} emails
- {/* Bulk Actions Bar */} - {showBulkActions && selectedEmails.length > 0 && ( -
- {selectedEmails.length} selected -
- -
-
- )} - {/* Email List */} - {loading ? ( -
-
-
- ) : ( -
    - {emails.map((email) => ( -
  • handleEmailSelect(email.id)} - > -
    -
    -
    - e.stopPropagation()} - onCheckedChange={(checked) => { - if (checked) { - setSelectedEmails([...selectedEmails, email.id.toString()]); - } else { - setSelectedEmails(selectedEmails.filter(id => id !== email.id.toString())); - } - }} - /> -
    -

    - {email.fromName || email.from} -

    -

    {email.subject}

    -
    -
    -
    - {formatDate(email.date)} - -
    -
    +
    + {filteredEmails.map((email) => ( +
    handleEmailSelect(email.id)} + > +
    +
    +
    + e.stopPropagation()} + onCheckedChange={(checked) => { + if (checked) { + setSelectedEmails([...selectedEmails, email.id.toString()]); + } else { + setSelectedEmails(selectedEmails.filter(id => id !== email.id.toString())); + } + }} + /> +
    +

    + {email.fromName || email.from} +

    +

    {email.subject}

    -
  • - ))} -
- )} +
+
+ {formatDate(email.date)} + +
+
+
+ + ))} + {/* Email preview panel */} @@ -1263,180 +1237,5 @@ export default function MailPage() { - - {/* Compose Email Modal - Updated Design */} - {showCompose && ( -
-
- {/* Modal Header */} -
-

New Message

- -
- - {/* Modal Body - Make it scrollable */} -
-
- {/* To Field */} -
- - setComposeTo(e.target.value)} - placeholder="recipient@example.com" - className="w-full mt-1 bg-white border-gray-300 text-gray-900" - /> -
- - {/* CC/BCC Toggle Buttons */} -
- - -
- - {/* CC Field */} - {showCc && ( -
- - setComposeCc(e.target.value)} - placeholder="cc@example.com" - className="w-full mt-1 bg-white border-gray-300 text-gray-900" - /> -
- )} - - {/* BCC Field */} - {showBcc && ( -
- - setComposeBcc(e.target.value)} - placeholder="bcc@example.com" - className="w-full mt-1 bg-white border-gray-300 text-gray-900" - /> -
- )} - - {/* Subject Field */} -
- - setComposeSubject(e.target.value)} - placeholder="Enter subject" - className="w-full mt-1 bg-white border-gray-300 text-gray-900" - /> -
- - {/* Message Body */} -
- -