PnLClient.tsx 602 B

123456789101112131415161718192021222324
  1. 'use client';
  2. import { CumulativePnLChart, DailyPnLChart } from '@/components/PnLChart';
  3. import type { PnLDataPoint } from '@/lib/types';
  4. export function PnLClient({ data }: { data: PnLDataPoint[] }) {
  5. return (
  6. <>
  7. <div className="card">
  8. <h2 className="text-lg font-semibold text-white mb-4">
  9. Cumulative PnL
  10. </h2>
  11. <CumulativePnLChart data={data} />
  12. </div>
  13. <div className="card">
  14. <h2 className="text-lg font-semibold text-white mb-4">
  15. Daily PnL
  16. </h2>
  17. <DailyPnLChart data={data} />
  18. </div>
  19. </>
  20. );
  21. }