mirror of
https://github.com/actualbudget/actual.git
synced 2026-05-05 22:52:20 -05:00
fix bank sync account linking modal being disabled when relinking existing accounts (#7487)
* fix link account modal button disabled * note
This commit is contained in:
@@ -128,7 +128,16 @@ export function SelectLinkedAccountsModal({
|
||||
const localAccounts = allAccounts.filter(a => a.closed === 0);
|
||||
const [draftLinkAccounts, setDraftLinkAccounts] = useState<
|
||||
Map<string, 'linking' | 'unlinking'>
|
||||
>(new Map());
|
||||
>(() => {
|
||||
const externalAccountIds = new Set(externalAccounts.map(a => a.account_id));
|
||||
const initial = new Map<string, 'linking' | 'unlinking'>();
|
||||
for (const acc of localAccounts) {
|
||||
if (acc.account_id && externalAccountIds.has(acc.account_id)) {
|
||||
initial.set(acc.account_id, 'linking');
|
||||
}
|
||||
}
|
||||
return initial;
|
||||
});
|
||||
const [chosenAccounts, setChosenAccounts] = useState<Record<string, string>>(
|
||||
() => {
|
||||
return Object.fromEntries(
|
||||
|
||||
6
upcoming-release-notes/7487.md
Normal file
6
upcoming-release-notes/7487.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Bugfixes
|
||||
authors: [matt-fidd]
|
||||
---
|
||||
|
||||
Fix bank sync account linking modal being disabled when relinking existing accounts
|
||||
Reference in New Issue
Block a user