Files
nofx/web/src
tinkle-community a7c276fe3c Fix: Support dynamic number of traders in ComparisonChart
Previously, ComparisonChart was hardcoded to only fetch equity history
data for the first 2 traders, causing the 3rd and subsequent traders'
data to not be displayed on the chart.
Changes:
- Replaced multiple individual useSWR calls with single consolidated call
- Use Promise.all() to fetch all traders' equity data concurrently
- Generate dynamic cache key based on all trader IDs
- Maintain backward compatibility with existing component structure
- Update useMemo dependencies to properly track data changes
This fix allows the comparison chart to properly display any number of
competing traders, not just 2.
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
2025-10-29 21:42:34 +08:00
..