From 834701aa2c8e78b3194386183280ac09d9403e13 Mon Sep 17 00:00:00 2001 From: enes Date: Wed, 13 Nov 2024 10:43:49 +0100 Subject: [PATCH] fix(home): latest mods published_at sort --- src/pages/home.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/home.tsx b/src/pages/home.tsx index 072cfc3..64ec771 100644 --- a/src/pages/home.tsx +++ b/src/pages/home.tsx @@ -254,6 +254,8 @@ const DisplayLatestMods = () => { useDidMount(() => { fetchMods({ source: window.location.host }) .then((mods) => { + // Sort by the latest (published_at descending) + mods.sort((a, b) => b.published_at - a.published_at) setLatestMods(mods) }) .finally(() => {