fix(sf-legacy): velocity=0 → '—' в MarketTab (consistency со «Срок продаж») #362
1 changed files with 6 additions and 1 deletions
|
|
@ -60,7 +60,12 @@ export function MarketTab({ data }: Props) {
|
|||
// competitors count as proxy for active (строящихся) count for now.
|
||||
const activeCount = data.competitors.length;
|
||||
const radiusKm = getRadiusKm(data);
|
||||
const velocityPerMonth = data.velocity?.monthly_velocity_sqm ?? null;
|
||||
// Treat zero velocity as "no data" — backend returns 0 when competitors
|
||||
// are unmapped to Objective ground truth (OBJ-3). Showing "0.0 м²/мес"
|
||||
// is misleading; "—" makes it clear data is unavailable.
|
||||
const velocityRaw = data.velocity?.monthly_velocity_sqm;
|
||||
const velocityPerMonth =
|
||||
velocityRaw != null && velocityRaw > 0 ? velocityRaw : null;
|
||||
const maxMixPct = getMaxMixPct(data);
|
||||
const salesPeriodMonths = getSalesPeriodMonths(data);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue