diff --git a/frontend/components/dashboard/scan-terminal/MobileCityCard.tsx b/frontend/components/dashboard/scan-terminal/MobileCityCard.tsx new file mode 100644 index 00000000..1f8c3291 --- /dev/null +++ b/frontend/components/dashboard/scan-terminal/MobileCityCard.tsx @@ -0,0 +1,76 @@ +"use client"; + +import type { ScanOpportunityRow } from "@/lib/dashboard-types"; +import { + formatPrice, + GAP_COLOR_MAP, + getGapColor, + getSignalLabel, + getSignalState, +} from "@/components/dashboard/scan-terminal/continent-grouping"; + +function rowName(row: ScanOpportunityRow) { + return row.city_display_name || row.display_name || row.city || "--"; +} + +function tempVal(value?: number | null, symbol?: string | null) { + const n = Number(value); + if (!Number.isFinite(n)) return "--"; + return `${n.toFixed(1)}${symbol || "°"}`; +} + +export function MobileCityCard({ + isEn, + onClick, + row, +}: { + isEn: boolean; + onClick: (row: ScanOpportunityRow) => void; + row: ScanOpportunityRow; +}) { + const signal = getSignalState(row); + const gapColor = GAP_COLOR_MAP[getGapColor(row)]; + + return ( + + ); +}