courrier multi account restore compose

This commit is contained in:
alma 2025-04-30 14:14:51 +02:00
parent 952144c03c
commit f77f228f07

View File

@ -487,7 +487,7 @@ export default function CourrierPage() {
}
};
// Update the accounts from state
// Update the accounts from state - fix type issues
const setAccounts = (newAccounts: Account[]) => {
// Dispatch action directly through our hook's returned state values
const action = { type: 'SET_ACCOUNTS', payload: newAccounts };
@ -591,7 +591,7 @@ export default function CourrierPage() {
const realAccount = saveResult.account;
realAccount.color = colorPalette[realAccounts.length % colorPalette.length];
realAccount.folders = testResult.details.sampleFolders || ['INBOX', 'Sent', 'Drafts', 'Trash'];
setAccounts(prev => [...prev, realAccount]);
setAccounts([...accounts, realAccount]);
setShowAddAccountForm(false);
toast({
title: "Account added successfully",