mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-10 22:36:58 +08:00
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:
@@ -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 || [])
|
||||
|
||||
Reference in New Issue
Block a user