diff --git a/apps/frontend/src/features/dashboard/DashboardPage.tsx b/apps/frontend/src/features/dashboard/DashboardPage.tsx index 77c59f6..1a6f968 100644 --- a/apps/frontend/src/features/dashboard/DashboardPage.tsx +++ b/apps/frontend/src/features/dashboard/DashboardPage.tsx @@ -1,7 +1,7 @@ import { Minus, RefreshCw, TrendingDown, TrendingUp } from "lucide-react"; import { RelativeTime } from "@/lib/time"; import type { Quote } from "@/lib/api"; -import { useQuotes, useFetchQuotes, useMonthlyPayedTotal } from "@/lib/queries"; +import { useQuotes, useFetchQuotes, useMonthlyPayedTotal, useMonthlyTotals } from "@/lib/queries"; import { useNavigate } from "@tanstack/react-router"; import { Tooltip, @@ -103,6 +103,7 @@ export function DashboardPage() { const now = new Date(); const { data: monthlyExpenses } = useMonthlyPayedTotal(now.getFullYear(), now.getMonth() + 1); + const { data: monthlyTotals } = useMonthlyTotals(now.getFullYear(), now.getMonth() + 1); const isFetching = isLoading || isPending; @@ -122,8 +123,8 @@ export function DashboardPage() {
-

Total ingresos

-

$0.00

+

Pagos pendientes

+

${priceFormatter.format(monthlyTotals?.pending ?? 0)}

Gastos del mes