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[]) => {
|
const setAccounts = (newAccounts: Account[]) => {
|
||||||
// Dispatch action directly through our hook's returned state values
|
// Dispatch action directly through our hook's returned state values
|
||||||
const action = { type: 'SET_ACCOUNTS', payload: newAccounts };
|
const action = { type: 'SET_ACCOUNTS', payload: newAccounts };
|
||||||
@ -591,7 +591,7 @@ export default function CourrierPage() {
|
|||||||
const realAccount = saveResult.account;
|
const realAccount = saveResult.account;
|
||||||
realAccount.color = colorPalette[realAccounts.length % colorPalette.length];
|
realAccount.color = colorPalette[realAccounts.length % colorPalette.length];
|
||||||
realAccount.folders = testResult.details.sampleFolders || ['INBOX', 'Sent', 'Drafts', 'Trash'];
|
realAccount.folders = testResult.details.sampleFolders || ['INBOX', 'Sent', 'Drafts', 'Trash'];
|
||||||
setAccounts(prev => [...prev, realAccount]);
|
setAccounts([...accounts, realAccount]);
|
||||||
setShowAddAccountForm(false);
|
setShowAddAccountForm(false);
|
||||||
toast({
|
toast({
|
||||||
title: "Account added successfully",
|
title: "Account added successfully",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user