From 3c5fcfa28dd8c9adb2346e0f6e867c4f2305068e Mon Sep 17 00:00:00 2001 From: Abram Date: Thu, 14 Sep 2023 07:26:41 +0100 Subject: [PATCH] Cleanup - fix type error --- .../EvaluationTable/CustomCodeRunEvaluationTable.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/agenta-web/src/components/EvaluationTable/CustomCodeRunEvaluationTable.tsx b/agenta-web/src/components/EvaluationTable/CustomCodeRunEvaluationTable.tsx index e3c653a76e..d87b1e56a9 100644 --- a/agenta-web/src/components/EvaluationTable/CustomCodeRunEvaluationTable.tsx +++ b/agenta-web/src/components/EvaluationTable/CustomCodeRunEvaluationTable.tsx @@ -156,7 +156,7 @@ const CustomCodeRunEvaluationTable: React.FC = ( const [evaluationStatus, setEvaluationStatus] = useState(evaluation.status) const [evaluationResults, setEvaluationResults] = useState(null) const [evaluationTestsets, setEvaluationTestsets] = useState([]) - const [listScenariosResult, setListScenariosResult] = useState([]) + const [listScenariosResult, setListScenariosResult] = useState([]) useEffect(() => { if (evaluationScenarios) { @@ -247,8 +247,9 @@ const CustomCodeRunEvaluationTable: React.FC = ( if (listScenariosResult.length !== evaluationScenarios.length) { const response: any = await fetchEvaluationScenarioResults(scenario_id) if (response.status === 200) { + const responseData = response.data as IScenarioScore if (listScenariosResult.length !== evaluationScenarios.length) { - listScenariosResult.push(response?.data) + listScenariosResult.push(responseData) setListScenariosResult([...listScenariosResult]) } }