We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05b3f7c commit 5242ad4Copy full SHA for 5242ad4
ui/home/LatestDataItems.tsx
@@ -19,7 +19,13 @@ const LatestDataItems = () => {
19
}
20
21
if (items) {
22
- const dataToShow = items.slice(0, itemsCount);
+ const sorted = [...items].sort((a, b) => {
23
+ const aTime = a.LastModified ? new Date(a.LastModified).getTime() : 0;
24
+ const bTime = b.LastModified ? new Date(b.LastModified).getTime() : 0;
25
+ return bTime - aTime;
26
+ });
27
+
28
+ const dataToShow = sorted.slice(0, itemsCount);
29
30
content = (
31
<VStack spacing={ 2 } overflow="hidden" alignItems="stretch">
0 commit comments