feat: add links to transaction pages from accounts and folders for improved navigation

This commit is contained in:
Julien Froidefond
2025-11-27 11:53:36 +01:00
parent 5eb37e631f
commit ef668510c8
3 changed files with 24 additions and 4 deletions

View File

@@ -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({
)}
>
<Building2 className="w-4 h-4 text-muted-foreground" />
<span className="flex-1 text-sm">{account.name}</span>
<Link
href={`/transactions?accountId=${account.id}`}
className="flex-1 text-sm hover:text-primary hover:underline"
>
{account.name}
</Link>
<span
className={cn(
"text-sm tabular-nums",