courrier multi account restore compose
This commit is contained in:
parent
37aa5aded9
commit
74dcb1b8ba
@ -163,25 +163,6 @@ export default function CourrierPage() {
|
||||
// Track folder visibility per account
|
||||
const [visibleFolders, setVisibleFolders] = useState<Record<string, string[]>>({});
|
||||
|
||||
// Update account folders when mailboxes change
|
||||
useEffect(() => {
|
||||
setAccounts(prev => {
|
||||
const updated = [...prev];
|
||||
const accountIndex = updated.findIndex(acc => acc.id === selectedAccount?.id);
|
||||
if (accountIndex !== -1) {
|
||||
updated[accountIndex] = {
|
||||
...updated[accountIndex],
|
||||
folders: mailboxes
|
||||
};
|
||||
setVisibleFolders(prev => ({
|
||||
...prev,
|
||||
[updated[accountIndex].id]: mailboxes
|
||||
}));
|
||||
}
|
||||
return updated;
|
||||
});
|
||||
}, [mailboxes, selectedAccount]);
|
||||
|
||||
// Debug accounts state
|
||||
useEffect(() => {
|
||||
console.log('Current accounts state:', accounts);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user