Let's test this out

pull/49/head
Lim Chee Aun 2023-01-30 20:30:45 +08:00
rodzic 88ffb3a44c
commit 1cfef22465
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -36,6 +36,12 @@ function Home({ hidden }) {
}
const allStatuses = await homeIterator.current.next();
if (allStatuses.value?.length) {
// ENFORCE sort by datetime (Latest first)
allStatuses.value.sort((a, b) => {
const aDate = new Date(a.createdAt);
const bDate = new Date(b.createdAt);
return bDate - aDate;
});
const homeValues = allStatuses.value.map((status) => {
saveStatus(status);
return {