From 501c8653efd499410ad61ed779a980e49e52ede4 Mon Sep 17 00:00:00 2001 From: Michael Clark <5285928+MikesGlitch@users.noreply.github.com> Date: Mon, 2 Dec 2024 08:53:57 +0000 Subject: [PATCH] :bug: Fix flicker when saving transaction on account page when transactions are scheduled (#3920) * fix flicker when saving transaction on account page when there are scheduled * release notes --- .../src/hooks/useAccountPreviewTransactions.ts | 11 +++++------ upcoming-release-notes/3920.md | 6 ++++++ 2 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 upcoming-release-notes/3920.md diff --git a/packages/desktop-client/src/hooks/useAccountPreviewTransactions.ts b/packages/desktop-client/src/hooks/useAccountPreviewTransactions.ts index ca1471c999b..d66e7687224 100644 --- a/packages/desktop-client/src/hooks/useAccountPreviewTransactions.ts +++ b/packages/desktop-client/src/hooks/useAccountPreviewTransactions.ts @@ -32,10 +32,6 @@ export function useAccountPreviewTransactions({ const payees = usePayees(); const previewTransactions = useMemo(() => { - if (isLoading) { - return []; - } - if (!accountId) { return originalPreviewTransactions; } @@ -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 = { diff --git a/upcoming-release-notes/3920.md b/upcoming-release-notes/3920.md new file mode 100644 index 00000000000..e0abd6667ce --- /dev/null +++ b/upcoming-release-notes/3920.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [MikesGlitch] +--- + +Fix flickering when saving a transaction when there are transactions scheduled