fix(dashboard): preserve trader selection in URL and silence background requests (#1459)

* refactor: streamline trader selection logic and URL handling in App component

* refactor: update API request handling across components to use silent mode for improved error management

---------

Co-authored-by: Dean <afei.wuhao@gmail.com>
This commit is contained in:
deanokk
2026-04-04 17:16:47 +08:00
committed by GitHub
parent 8a0f3f5a13
commit 80272c0d5a
8 changed files with 76 additions and 41 deletions

View File

@@ -359,7 +359,11 @@ export function PositionHistory({ traderId }: PositionHistoryProps) {
setLoading(true)
setError(null)
// Fetch more data than needed to support filtering, but respect pageSize for initial load
const data = await api.getPositionHistory(traderId, Math.max(200, pageSize * 5))
const data = await api.getPositionHistory(
traderId,
Math.max(200, pageSize * 5),
true
)
setPositions(data.positions || [])
setStats(data.stats)
setSymbolStats(data.symbol_stats || [])