Merge pull request #9 from Senney/owncast-40-sort-connected-time

Implement sorting by "Connected Time"
This commit is contained in:
Gabe Kangas 2020-12-29 13:58:45 -08:00 committed by GitHub
commit e70299de90

View file

@ -86,6 +86,8 @@ export default function ViewersOverTime() {
dataIndex: "connectedAt",
key: "connectedAt",
render: (time) => formatDistanceToNow(new Date(time)),
sorter: (a, b) => new Date(a.connectedAt).getTime() - new Date(b.connectedAt).getTime(),
sortDirections: ["descend", "ascend"] as SortOrder[],
},
{
title: "User Agent",