fix(dashboard): sort recent tickets by newest first
This commit is contained in:
parent
955543d740
commit
8eaf7948f7
1 changed files with 3 additions and 1 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue