perf: 性能优化与代码质量改进

- 简化ToastProvider组件,移除未使用导入
- 简化Stats页面代码
- 添加React ESLint配置
- 添加数据库索引和API参数验证
- 清理重复文件server.js.backup
- 移除前端未使用的UI代码和复杂样式

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Developer
2026-03-23 16:43:03 +08:00
co-authored by Claude Opus 4.6
parent 3975bbed73
commit 63c97ab31a
9 changed files with 43 additions and 859 deletions
-10
View File
@@ -1,5 +1,3 @@
import { getRecords, getStats, getCategories, getRecurringBills } from './api';
// 全局 SWR 配置
export const swrConfig = {
refreshInterval: 0, // 默认不自动刷新
@@ -11,11 +9,3 @@ export const swrConfig = {
console.error('SWR Error:', error);
},
};
// 数据获取器映射
export const fetchers = {
records: (month, type) => getRecords(month, type),
stats: (month) => getStats(month),
categories: () => getCategories(),
recurring: () => getRecurringBills(),
};