Skip to content

Commit

Permalink
Cleanup - fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
aybruhm committed Sep 14, 2023
1 parent b93c371 commit 3c5fcfa
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ const CustomCodeRunEvaluationTable: React.FC<CustomCodeEvaluationTableProps> = (
const [evaluationStatus, setEvaluationStatus] = useState<EvaluationFlow>(evaluation.status)
const [evaluationResults, setEvaluationResults] = useState<any>(null)
const [evaluationTestsets, setEvaluationTestsets] = useState([])
const [listScenariosResult, setListScenariosResult] = useState([])
const [listScenariosResult, setListScenariosResult] = useState<IScenarioScore[]>([])

useEffect(() => {
if (evaluationScenarios) {
Expand Down Expand Up @@ -247,8 +247,9 @@ const CustomCodeRunEvaluationTable: React.FC<CustomCodeEvaluationTableProps> = (
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])
}
}
Expand Down

0 comments on commit 3c5fcfa

Please sign in to comment.