fix(dashboard): sort recent tickets by newest first

This commit is contained in:
thibaud-lclr 2026-04-20 14:57:08 +02:00
parent 955543d740
commit 8eaf7948f7

View file

@ -391,7 +391,9 @@ export default function ProjectDashboard() {
return <div className="p-8 text-gray-400">Loading...</div>; return <div className="p-8 text-gray-400">Loading...</div>;
} }
const recentTickets = tickets.slice(-10).reverse(); const recentTickets = [...tickets]
.sort((a, b) => Date.parse(b.detected_at) - Date.parse(a.detected_at))
.slice(0, 10);
const activePollList = Object.entries(activePolls); const activePollList = Object.entries(activePolls);
const activeAgentList = Object.values(activeAgents); const activeAgentList = Object.values(activeAgents);
const done24h = throughput?.done_last_24h ?? 0; const done24h = throughput?.done_last_24h ?? 0;