Files
affiliate_dash/frontend
yml2213 b1089f37b2 refactor(web): 拆分 PlatformRock 大屏为容器 + 9 个子组件(1306 → 最大 335 行)
- PlatformRock.tsx 335 行:保留全部 state、loadData/loadTokens、useEffect、
  handler 与顶层布局;默认导出名不变,App.tsx 的 lazy 导入未改
- platformRock/ 子目录:tokenColumns 329、RockStrategyCard 267、
  PurchaseTokenModal 183、RockTokenTable 156、RockMetricCards 124、
  VoucherPreviewModal 95、RockTokenFilterBar 76、UidEditModal 47、types.ts 6

state 归属与更新时机、请求次数与参数、useEffect 依赖语义均未改变;子组件 props
显式声明类型,无 any;行级异步 handler 随表格下沉,state setter 经显式类型 props 传入。

验证:
- SSR 快照 renderToString 拆分前后字节一致(40920 bytes)
- jsdom 交互差分:拆分前后 23 个检查点的 DOM 快照与 API 调用日志完全一致
  (覆盖采购、UID 修正、解冻、释放、熔断、筛选/搜索/翻页、保存配置、连通性测试)
- 原文件应保留的 230 行代码逐字命中
2026-10-06 19:43:29 +08:00
..
2026-08-04 15:34:34 +08:00
2026-07-20 14:58:57 +08:00
2026-07-20 14:58:57 +08:00
2026-07-20 14:58:57 +08:00
2026-07-20 14:58:57 +08:00
2026-07-20 14:58:57 +08:00
2026-07-20 14:58:57 +08:00
2026-07-20 14:58:57 +08:00
2026-07-20 14:58:57 +08:00
2026-07-20 14:58:57 +08:00
2026-08-04 15:34:34 +08:00

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the Oxlint configuration

If you are developing a production application, we recommend enabling type-aware lint rules by installing oxlint-tsgolint and editing .oxlintrc.json:

{
  "$schema": "./node_modules/oxlint/configuration_schema.json",
  "plugins": ["react", "typescript", "oxc"],
  "options": {
    "typeAware": true
  },
  "rules": {
    "react/rules-of-hooks": "error",
    "react/only-export-components": ["warn", { "allowConstantExport": true }]
  }
}

See the Oxlint rules documentation for the full list of rules and categories.