fix: apply parseUTC to dashboard, unify date helpers in date-utils.ts

Agent-Logs-Url: https://github.com/christianlouis/InboxConverge/sessions/3f06f1fc-4d21-47eb-b883-070c6cbefa93

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-28 21:27:51 +00:00
parent 129d8a1bdd
commit db3ce61467
5 changed files with 47 additions and 51 deletions
+1 -14
View File
@@ -8,7 +8,7 @@ import { useAuthStore } from '@/store/authStore';
import { useRouter } from 'next/navigation';
import { useEffect } from 'react';
import { adminApi, AdminProcessingRun } from '@/lib/api';
import { parseUTC } from '@/lib/date-utils';
import { formatDate, formatDuration } from '@/lib/date-utils';
import {
Activity,
ChevronLeft,
@@ -25,19 +25,6 @@ const STATUS_STYLES: Record<string, string> = {
running: 'bg-blue-100 text-blue-800',
};
function formatDuration(seconds?: number | null): string {
if (seconds == null) return '—';
if (seconds < 60) return `${seconds.toFixed(1)}s`;
return `${Math.floor(seconds / 60)}m ${Math.round(seconds % 60)}s`;
}
function formatDate(iso: string): string {
return parseUTC(iso).toLocaleString(undefined, {
dateStyle: 'short',
timeStyle: 'medium',
});
}
export default function AdminLogsPage() {
const { user } = useAuthStore();
const router = useRouter();