Implement sorting by "Connected Time"
This commit is contained in:
parent
94395ed182
commit
f31a2deb82
@ -86,6 +86,8 @@ export default function ViewersOverTime() {
|
|||||||
dataIndex: "connectedAt",
|
dataIndex: "connectedAt",
|
||||||
key: "connectedAt",
|
key: "connectedAt",
|
||||||
render: (time) => formatDistanceToNow(new Date(time)),
|
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",
|
title: "User Agent",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user