lekss361
|
c6cabc1990
|
fix(site-finder): align VelocityBlock TS types with backend response shape
Per #147 bot review — cross-stack contract mismatch:
Backend velocity.py (PR #146 merged) returns:
obj_id, name, dev_name, obj_class, district_name, distance_m, total_sqm_period
Frontend types had:
obj_id, name, class, distance_m, total_sqm
Result: c.class undefined → never showed class chip; c.total_sqm undefined →
Math.round(NaN) = NaN, 'не число' в table column для всех 5 строк.
## Fix
- VelocityCompetitor.class → obj_class
- VelocityCompetitor.total_sqm → total_sqm_period
- Added optional dev_name, district_name fields
- Updated VelocityBlock.tsx — все 3 references (guard, chip render, table cell)
Refs: #34, #147
|
2026-05-15 01:37:11 +03:00 |
|
lekss361
|
33b6148cc5
|
feat(site-finder): VelocityBlock в MarketTab (#34 sub-PR 2/2 FINAL)
D2 velocity-score frontend: score gauge, period meta, top 5 competitors table.
TS types (Velocity/VelocityCompetitor/VelocityPeriod) добавлены.
Guard "velocity" in data для backward-compat pre-#146.
tsc 0 errors, ESLint 0 warnings.
Closes #34
|
2026-05-15 01:31:23 +03:00 |
|