feat: 创建首页并实现现代化的 Bento Grid 布局,展示财务概览数据和快速操作。
This commit is contained in:
@@ -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}
|
||||
/>
|
||||
</div>
|
||||
<div className="bento-span-1" onClick={() => setShowHealthModal(true)} style={{ cursor: 'pointer' }}>
|
||||
|
||||
Reference in New Issue
Block a user