diff --git a/frontend/src/components/landing/kpi/kpi.tsx b/frontend/src/components/landing/kpi/kpi.tsx index a837e0ca..af3948cd 100644 --- a/frontend/src/components/landing/kpi/kpi.tsx +++ b/frontend/src/components/landing/kpi/kpi.tsx @@ -21,7 +21,7 @@ const fetchKPIStats = async (): Promise => { }; const Kpi = () => { - const { data, isLoading,isError,error} = useQuery({ + const { data, isLoading, isError, error } = useQuery({ queryKey: ["kpis"], queryFn: fetchKPIStats, }); @@ -31,7 +31,7 @@ const Kpi = () => {

Error fetching KPI Stats

-

{(error as Error)?.message || 'An unknown error occurred.'}

+

{(error as Error)?.message || "An unknown error occurred."}

); diff --git a/frontend/src/features/models/components/training-history-table.tsx b/frontend/src/features/models/components/training-history-table.tsx index 572ba2aa..3bd8f80d 100644 --- a/frontend/src/features/models/components/training-history-table.tsx +++ b/frontend/src/features/models/components/training-history-table.tsx @@ -75,7 +75,9 @@ const columnDefinitions = ( header: APP_CONTENT.models.modelsDetailsCard.trainingHistoryTableHeader.duration, accessorFn: (row) => - formatDuration(new Date(row.started_at), new Date(row.finished_at)), + row.finished_at && row.started_at + ? formatDuration(new Date(row.started_at), new Date(row.finished_at)) + : "-", cell: (row) => ( {row.getValue() as string} ),