diff --git a/app/courrier/page.tsx b/app/courrier/page.tsx index dd8f4855..c259092e 100644 --- a/app/courrier/page.tsx +++ b/app/courrier/page.tsx @@ -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",