Files
PolyWeather/frontend/components/dashboard/scan-terminal/KoyfinRowsTable.tsx
2569718930@qq.com cdd3cd25ae 气象情报终端:移除 Polymarket 市场数据列和 MarketOverviewView
GroupedMarketTable 9列→6列(删Market/Edge/SprLiq)。continent-grouping 删 formatPrice/formatSpreadLiquidity,getGapColor 纯温度语义。KoyfinRowsTable 精简为城市列表。MobileCityCard 市场价格替换为本地时间。侧边栏移除市场概览入口。
2026-05-25 19:42:06 +08:00

52 lines
1.4 KiB
TypeScript

"use client";
import clsx from "clsx";
import type { ScanOpportunityRow } from "@/lib/dashboard-types";
import { rowName } from "@/components/dashboard/scan-terminal/utils";
export function KoyfinRowsTable({
isEn,
onSelect,
rows,
selectedId,
}: {
compact?: boolean;
isEn: boolean;
onSelect: (row: ScanOpportunityRow) => void;
rows: ScanOpportunityRow[];
selectedId?: string | null;
}) {
return (
<table className="w-full border-collapse text-[11px]">
<thead>
<tr className="border-b border-slate-200 bg-[#f3f5f7] text-[11px] uppercase tracking-wide text-slate-500">
<th className="px-2 py-1 text-left font-bold">
{isEn ? "City" : "城市"}
</th>
</tr>
</thead>
<tbody>
{rows.map((row) => (
<tr
key={row.id}
onClick={() => onSelect(row)}
className={clsx(
"cursor-pointer border-b border-slate-100 hover:bg-blue-50/70",
selectedId === row.id && "bg-blue-50",
)}
>
<td className="px-2 py-1">
<div className="truncate font-bold text-slate-800">
{rowName(row)}
</div>
<div className="truncate text-[10px] font-medium text-slate-400">
{row.airport || "--"}
</div>
</td>
</tr>
))}
</tbody>
</table>
);
}