Skip to content

Commit

Permalink
🐛 Fix flicker when saving transaction on account page when transactio…
Browse files Browse the repository at this point in the history
…ns are scheduled (actualbudget#3920)

* fix flicker when saving transaction on account page when there are scheduled

* release notes
  • Loading branch information
MikesGlitch authored Dec 2, 2024
1 parent 22623ce commit 501c865
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ export function useAccountPreviewTransactions({
const payees = usePayees();

const previewTransactions = useMemo(() => {
if (isLoading) {
return [];
}

if (!accountId) {
return originalPreviewTransactions;
}
Expand All @@ -50,9 +46,12 @@ export function useAccountPreviewTransactions({
a => a.id === payees.find(p => p.id === payeeId)?.transfer_acct,
),
});
}, [accountId, accounts, isLoading, originalPreviewTransactions, payees]);
}, [accountId, accounts, originalPreviewTransactions, payees]);

return { isLoading, previewTransactions };
return {
isLoading,
previewTransactions,
};
}

type AccountPreviewProps = {
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/3920.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [MikesGlitch]
---

Fix flickering when saving a transaction when there are transactions scheduled

0 comments on commit 501c865

Please sign in to comment.