Commit Graph

1 Commits

Author SHA1 Message Date
zdl
21b58c7c68 refactor(GlobalSidebar): TypeScript 重构与 HotConceptsPanel 模块化
- GlobalSidebar: JS 转换为 TypeScript,添加完整类型定义
- HotConceptsPanel 拆分为模块化目录结构:
  - types.ts: 类型定义 (Concept, ConceptStock, Props)
  - styles.ts: 样式常量 + 配置 (COLORS, CONFIG)
  - utils.ts: 工具函数 (formatChangePercent, getChangeColor)
  - hooks/useHotConcepts.ts: 数据获取 Hook
  - components/ConceptCard.tsx: 概念卡片原子组件 (memo 优化)
- 性能优化:useMemo 缓存计算,useCallback 缓存事件处理

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-31 17:23:17 +08:00