"use client"; // "ПОЯСНЕНИЕ К РАСЧЁТУ" right-side drawer for the /trade-in/v2 "МЕРА Оценка" // design port. Opened from HeroBar (the "?" near "КОЭФ. ЛОКАЦИИ"). This used to // render a FABRICATED location coefficient (0.87), a fake "base × coef = result" // formula and invented POI factor lists with a false "Источник: OpenStreetMap" // footer — none of which the backend produces (location-coef is deferred, // backend #2045). It is now an HONEST methodology panel with STATIC, truthful // documentation text only: how the estimate is built, and an explicit note that // the location coefficient does not exist yet. Keeps the same drawer shell / // slide animation / close button. Open/close is driven entirely by props; the // only effect is an Escape-to-close keydown listener while open. import { useEffect } from "react"; import { tokens } from "./tokens"; interface LocationDrawerProps { open: boolean; onClose: () => void; } export function LocationDrawer({ open, onClose }: LocationDrawerProps) { // Escape-to-close (UI effect only — no HTTP). Active while the drawer is open. useEffect(() => { if (!open) return; const onKey = (e: KeyboardEvent) => { if (e.key === "Escape") onClose(); }; window.addEventListener("keydown", onKey); return () => window.removeEventListener("keydown", onKey); }, [open, onClose]); return ( <> {/* scrim */}
{/* drawer */}
{/* left accent rail */}
{/* corner brackets */}
{/* header */}
МЕТОДИКА
ПОЯСНЕНИЕ К РАСЧЁТУ
{/* divider under header */}
{/* methodology section */}
КАК СЧИТАЕМ
Агрегируем объявления (Авито, Циан, Яндекс, Домклик) и сделки Росреестра по сопоставимым квартирам. Медиана{" "} ₽/м² → 3 оценки:{" "} рекомендованная цена в объявлении {" "} (asking),{" "} ожидаемая цена сделки (asking − торг по ДКП),{" "} ДКП·Росреестр (фактические сделки). CV — коэффициент вариации выборки (разброс цен).
{/* location note section */}
ЛОКАЦИЯ
Коэффициент локации (POI, транспорт, шум) —{" "} в разработке; текущая оценка по локации не корректируется.
); }