import React, {useEffect, useState} from 'react'; import TradingViewChart from './TradingViewChart'; import {ReportSummary} from "../types"; import { Title } from '@mantine/core'; import { Button } from '@mantine/core'; interface ReportDetailsProps { basePath: string; runID: string; } const fetchReportSummary = (basePath: string, runID: string) => { return fetch( `${basePath}/${runID}/summary.json`, ) .then((res) => res.json()) .catch((e) => { console.error("failed to fetch index", e) }); } const ReportDetails = (props: ReportDetailsProps) => { const [reportSummary, setReportSummary] = useState() useEffect(() => { fetchReportSummary(props.basePath, props.runID).then((summary: ReportSummary) => { console.log("summary", props.runID, summary); setReportSummary(summary) }) }, [props.runID]) if (!reportSummary) { return

Loading {props.runID}

; } return
RUN {props.runID}
{ reportSummary.symbols.map((symbol: string, i : number) => { return }) }
; }; export default ReportDetails;