- {currentData.map((item, index) => (
-
-
-
- {item.name}
-
-
- {formatCurrency(item.value)}
-
-
- ))}
+ {currentData.map((item, index) => {
+ const href =
+ item.categoryId === null || item.categoryId === undefined
+ ? "/transactions?includeUncategorized=true"
+ : `/transactions?categoryIds=${item.categoryId}`;
+
+ return (
+
+
+
+ {item.name}
+
+
+ {formatCurrency(item.value)}
+
+
+ );
+ })}
diff --git a/components/statistics/top-expenses-list.tsx b/components/statistics/top-expenses-list.tsx
index 4bd9a40..0174fef 100644
--- a/components/statistics/top-expenses-list.tsx
+++ b/components/statistics/top-expenses-list.tsx
@@ -1,5 +1,6 @@
"use client";
+import Link from "next/link";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { CategoryIcon } from "@/components/ui/category-icon";
import { Badge } from "@/components/ui/badge";
@@ -53,24 +54,29 @@ export function TopExpensesList({
{new Date(expense.date).toLocaleDateString("fr-FR")}
{category && (
-