fix(live): remount strategy detail when switching focused strategy

Keying LiveStrategyDetail by strategy name resets its child state (trade-log
pagination), so switching strategies no longer keeps the previous page index.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-25 00:16:39 +08:00
parent f0739185d4
commit c2882ae4cf
2 changed files with 2 additions and 1 deletions

View File

@@ -176,7 +176,7 @@ export function LivePage() {
<section className="liveDetail">
{focused ? (
<LiveStrategyDetail strategy={focused} />
<LiveStrategyDetail key={focused.name} strategy={focused} />
) : (
<div className="panel emptyState">
<Wallet size={40} />

View File

@@ -2227,6 +2227,7 @@ input:focus {
.liveListMeta {
display: flex;
justify-content: space-between;
gap: 8px;
font-size: 10px;
color: #6f7c8f;
font-weight: 700;