diff --git a/src/components/Home/HomeHero.tsx b/src/components/Home/HomeHero.tsx index d0263dc..08691dd 100644 --- a/src/components/Home/HomeHero.tsx +++ b/src/components/Home/HomeHero.tsx @@ -84,7 +84,11 @@ export function HomeHero({ catalog }: HeroProps) { export function ReadyShelf({ catalog }: { catalog: HackCardAttributes[] }) { const readyIds = useReadyBaseRomIds(); if (readyIds.size === 0) return null; - const ready = catalog.filter((h) => h.baseRomId && readyIds.has(h.baseRomId)).slice(0, 12); + // Most downloaded first; the catalog itself comes back in no particular order. + const ready = catalog + .filter((h) => h.baseRomId && readyIds.has(h.baseRomId)) + .sort((a, b) => b.downloads - a.downloads) + .slice(0, 12); const names = [...readyIds].map((id) => baseRoms.find((r) => r.id === id)?.name).filter((n): n is string => Boolean(n)); const title = names.length === 1 ? `Ready for your ${baseGameLabel(names[0])}` : "Ready to patch"; return ;