From 066d85d766a0ccec762bba1acf7aaffb8fa35ccc Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Sun, 22 Feb 2026 07:33:45 +0100 Subject: [PATCH] fix(web-dashboard): wire P&L chart data from API in PerformanceDashboard Co-Authored-By: Claude Opus 4.6 --- web-dashboard/src/pages/PerformanceDashboard.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/web-dashboard/src/pages/PerformanceDashboard.tsx b/web-dashboard/src/pages/PerformanceDashboard.tsx index 942aaed55..9ce7565b9 100644 --- a/web-dashboard/src/pages/PerformanceDashboard.tsx +++ b/web-dashboard/src/pages/PerformanceDashboard.tsx @@ -3,6 +3,11 @@ import { MetricCard } from '../components/charts/MetricCard'; import { useApiQuery } from '../hooks/useApi'; import type { PerformanceMetrics } from '../lib/types'; +interface PnLPoint { + date: string; + pnl: number; +} + export function PerformanceDashboard() { const metrics = useApiQuery( ['performance-metrics'], @@ -10,6 +15,12 @@ export function PerformanceDashboard() { { refetchInterval: 10000 }, ); + const pnlData = useApiQuery( + ['performance-pnl'], + '/performance/pnl', + { refetchInterval: 30000 }, + ); + const m = metrics.data; return ( @@ -43,13 +54,13 @@ export function PerformanceDashboard() { {/* Middle: P&L Chart */}
- +
{/* Bottom: Daily returns + Heatmap */}
- +