From dc5b747385541f2b781eeb735546a43ddcae1f3e Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Mon, 25 May 2026 17:16:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=BD=E7=A6=BB=20KoyfinRowsTable=20?= =?UTF-8?q?=E4=B8=BA=E7=8B=AC=E7=AB=8B=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scan-terminal/KoyfinRowsTable.tsx | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 frontend/components/dashboard/scan-terminal/KoyfinRowsTable.tsx diff --git a/frontend/components/dashboard/scan-terminal/KoyfinRowsTable.tsx b/frontend/components/dashboard/scan-terminal/KoyfinRowsTable.tsx new file mode 100644 index 00000000..9732eed7 --- /dev/null +++ b/frontend/components/dashboard/scan-terminal/KoyfinRowsTable.tsx @@ -0,0 +1,93 @@ +"use client"; + +import clsx from "clsx"; +import type { ScanOpportunityRow } from "@/lib/dashboard-types"; +import { formatPrice } from "@/components/dashboard/scan-terminal/continent-grouping"; +import { rowName, pct } from "@/components/dashboard/scan-terminal/utils"; + +function tablePrice(row: ScanOpportunityRow) { + return formatPrice(row.midpoint, row.ask, row.bid); +} + +export function KoyfinRowsTable({ + compact = false, + isEn, + onSelect, + rows, + selectedId, +}: { + compact?: boolean; + isEn: boolean; + onSelect: (row: ScanOpportunityRow) => void; + rows: ScanOpportunityRow[]; + selectedId?: string | null; +}) { + return ( +
| + + | ++ {isEn ? "City" : "城市"} + | ++ {isEn ? "Price" : "价格"} + | ++ {isEn ? "Chg" : "变化"} + | +% | +
|---|---|---|---|---|
| + + | +
+
+ {rowName(row)}
+
+
+ {row.target_label || row.market_question || row.airport || "--"}
+
+ |
+ + {tablePrice(row)} + | ++ {Number.isFinite(edge) ? `${positive ? "+" : ""}${edge.toFixed(1)}` : "--"} + | ++ {pct(row.market_probability ?? row.market_event_probability ?? row.model_probability)} + | +