From 5cf2003ca7138912550ce793ef925ebc975c92a5 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 28 Feb 2026 10:16:38 +0000 Subject: [PATCH] fix: limit trade flow to 20 rows --- frontend/app/trades/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/app/trades/page.tsx b/frontend/app/trades/page.tsx index 3774e8b..8a55aa6 100644 --- a/frontend/app/trades/page.tsx +++ b/frontend/app/trades/page.tsx @@ -73,8 +73,8 @@ function LiveTrades({ symbol }: { symbol: Symbol }) { const existingIds = new Set(prev.map((t: TradeRow) => t.agg_id)); const newOnes = incoming.filter((t: TradeRow) => !existingIds.has(t.agg_id)); if (newOnes.length === 0) return prev; - // 最新在顶部,最多保留50条 - return [...newOnes, ...prev].slice(0, 50); + // 最新在顶部,最多保留20条 + return [...newOnes, ...prev].slice(0, 20); }); setLoading(false); } catch {}