Implement sorting by "Connected Time"

This commit is contained in:
Sean Heintz 2020-12-29 02:13:39 -07:00
parent 94395ed182
commit f31a2deb82

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",