From 5dafefa1abd9847349c1f96b68fb183bb3c51e81 Mon Sep 17 00:00:00 2001 From: admin <1297598740@qq.com> Date: Mon, 2 Feb 2026 16:11:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=9B=E5=BB=BA=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=B9=B6=E5=AE=9E=E7=8E=B0=E7=8E=B0=E4=BB=A3=E5=8C=96=E7=9A=84?= =?UTF-8?q?=20Bento=20Grid=20=E5=B8=83=E5=B1=80=EF=BC=8C=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E8=B4=A2=E5=8A=A1=E6=A6=82=E8=A7=88=E6=95=B0=E6=8D=AE=E5=92=8C?= =?UTF-8?q?=E5=BF=AB=E9=80=9F=E6=93=8D=E4=BD=9C=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Home/Home.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/Home/Home.tsx b/src/pages/Home/Home.tsx index 9616d14..dc0a901 100644 --- a/src/pages/Home/Home.tsx +++ b/src/pages/Home/Home.tsx @@ -194,6 +194,8 @@ function Home() { }; }, [todayTransactions, weekTransactions, categories, monthlyBudgetSpentTotal]); + const weeklyTotal = useMemo(() => calculateTotalExpense(weekTransactions), [weekTransactions]); + const recentTransactionsForAI = useMemo(() => { return weekTransactions.map(t => ({ date: new Date(t.transactionDate).toLocaleDateString('zh-CN'), @@ -320,7 +322,7 @@ function Home() { top3Categories={top3Categories} todayTransactionCount={todayTransactionCount} last7DaysSpend={last7DaysSpend} - weeklyTotal={useMemo(() => calculateTotalExpense(weekTransactions), [weekTransactions])} + weeklyTotal={weeklyTotal} />
setShowHealthModal(true)} style={{ cursor: 'pointer' }}>