From ef668510c84bd2fb8c426e2de548a23ce192a157 Mon Sep 17 00:00:00 2001 From: Julien Froidefond Date: Thu, 27 Nov 2025 11:53:36 +0100 Subject: [PATCH] feat: add links to transaction pages from accounts and folders for improved navigation --- app/accounts/page.tsx | 8 ++++++-- app/folders/page.tsx | 8 +++++++- app/transactions/page.tsx | 12 +++++++++++- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/app/accounts/page.tsx b/app/accounts/page.tsx index f33ec40..089f22f 100644 --- a/app/accounts/page.tsx +++ b/app/accounts/page.tsx @@ -40,6 +40,7 @@ import { } from "lucide-react"; import type { Account } from "@/lib/types"; import { cn } from "@/lib/utils"; +import Link from "next/link"; const accountTypeIcons = { CHECKING: Wallet, @@ -235,9 +236,12 @@ export default function AccountsPage() { {formatCurrency(account.balance)}
- + {getTransactionCount(account.id)} transactions - + {folder && {folder.name}}
{account.lastImport && ( diff --git a/app/folders/page.tsx b/app/folders/page.tsx index 47e6bd6..26ce9c4 100644 --- a/app/folders/page.tsx +++ b/app/folders/page.tsx @@ -46,6 +46,7 @@ import { } from "@/lib/store-db"; import type { Folder as FolderType, Account } from "@/lib/types"; import { cn } from "@/lib/utils"; +import Link from "next/link"; const folderColors = [ { value: "#6366f1", label: "Indigo" }, @@ -177,7 +178,12 @@ function FolderTreeItem({ )} > - {account.name} + + {account.name} + ("all"); + + // Initialize account filter from URL params + useEffect(() => { + const accountId = searchParams.get("accountId"); + if (accountId) { + setSelectedAccount(accountId); + } + }, [searchParams]); const [selectedCategory, setSelectedCategory] = useState("all"); const [showReconciled, setShowReconciled] = useState("all"); const [sortField, setSortField] = useState("date");