Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #297 #298

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading