Skip to content

Commit

Permalink
Fix preview transactions not showing on all accounts page and aggrega…
Browse files Browse the repository at this point in the history
…ted accounts page (budgeted/offbudget) (#3873)

* Fix preview transactions not showing on all accounts

* Release notes
  • Loading branch information
joel-jeremy authored Nov 21, 2024
1 parent c626fc2 commit 19f0037
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { useAccounts } from './useAccounts';
import { usePayees } from './usePayees';

type UseAccountPreviewTransactionsProps = {
accountId: AccountEntity['id'];
accountId?: AccountEntity['id'];
};

type UseAccountPreviewTransactionsResult = {
Expand All @@ -32,9 +32,14 @@ export function useAccountPreviewTransactions({
const payees = usePayees();

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

if (!accountId) {
return originalPreviewTransactions;
}

return accountPreview({
accountId,
transactions: originalPreviewTransactions,
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/3873.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [joel-jeremy]
---

Fix preview transactions not showing in all accounts and aggregated accounts (budgeted/offbudget)

0 comments on commit 19f0037

Please sign in to comment.