courrier multi account restore compose
This commit is contained in:
parent
952144c03c
commit
f77f228f07
@ -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",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user