From 018536e11d5b66cb5db3c6c4727ce12fff58e111 Mon Sep 17 00:00:00 2001 From: daniyal Date: Tue, 3 Sep 2024 14:59:23 +0500 Subject: [PATCH] fix: sort the mods in by published_at before displaying in latest mods section of landing page --- src/pages/home.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/home.tsx b/src/pages/home.tsx index eabe56b..7c697a9 100644 --- a/src/pages/home.tsx +++ b/src/pages/home.tsx @@ -251,6 +251,7 @@ const DisplayLatestMods = () => { useDidMount(() => { fetchMods({ source: window.location.host, limit: 4 }) .then((res) => { + res.sort((a, b) => b.published_at - a.published_at) setLatestMods(res) }) .finally(() => {