diff --git a/ui/src/components/DetectionsTable.tsx b/ui/src/components/DetectionsTable.tsx index 8ba673ed..99e23955 100644 --- a/ui/src/components/DetectionsTable.tsx +++ b/ui/src/components/DetectionsTable.tsx @@ -75,7 +75,13 @@ export default function DetectionsTable({ a.id.localeCompare(b.id)) + .sort(({ timestamp: a }, { timestamp: b }) => { + const date_a = new Date(a); + const date_b = new Date(b); + + // Sort by timestamp, low to high + return +date_a - +date_b; + }) .map((d, index) => ({ label: (index + 1).toString(), value: Number((+d.playerOffset - +startOffset).toFixed(1)),