mail page imap connection mime 5 bis rest 16 login page 4

This commit is contained in:
alma 2025-04-15 23:39:12 +02:00
parent 8b0773cfb9
commit 76ea7ffe66

View File

@ -409,6 +409,13 @@ export default function MailPage() {
}
}, [router]);
// Load emails on mount and when selectedAccount changes
useEffect(() => {
if (!loading) {
loadEmails();
}
}, [loading, selectedAccount]);
// Show loading state if credentials are not loaded
if (loading) {
return (
@ -600,11 +607,6 @@ export default function MailPage() {
return emails.find(email => email.id === selectedEmail?.id);
};
// Add useEffect to load emails on mount
useEffect(() => {
loadEmails();
}, []);
// Add account management functions
const handleAddAccount = () => {
// Implementation for adding a new account