Skip to content

Commit

Permalink
fixes #297
Browse files Browse the repository at this point in the history
  • Loading branch information
jeafreezy committed Oct 22, 2024
1 parent 2ae23a8 commit 66f8ab8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/landing/kpi/kpi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const fetchKPIStats = async (): Promise<TKPIResponse> => {
};

const Kpi = () => {
const { data, isLoading,isError,error} = useQuery({
const { data, isLoading, isError, error } = useQuery({
queryKey: ["kpis"],
queryFn: fetchKPIStats,
});
Expand All @@ -31,7 +31,7 @@ const Kpi = () => {
<section className={styles.kpiContainer}>
<div>
<h2>Error fetching KPI Stats</h2>
<p>{(error as Error)?.message || 'An unknown error occurred.'}</p>
<p>{(error as Error)?.message || "An unknown error occurred."}</p>
</div>
</section>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) => (
<span title={row.getValue() as string}>{row.getValue() as string}</span>
),
Expand Down

0 comments on commit 66f8ab8

Please sign in to comment.