From f77f228f07123055acb2df26667a58d04829c488 Mon Sep 17 00:00:00 2001 From: alma Date: Wed, 30 Apr 2025 14:14:51 +0200 Subject: [PATCH] courrier multi account restore compose --- app/courrier/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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",