feat: rank apps with most installed for a chosen category (#10756)

This commit is contained in:
Koushik Sai authored and GitHub committed 2023-08-16 12:43:37 -07:00
1 parent 65a1aa6100
commit 028bd77c91
1 file changed
+5 -3
@@ -40,9 +40,11 @@ export default function Apps({ apps }: InferGetStaticPropsType<typeof getStaticP
}>
<div className="mb-16">
<div className="grid-col-1 grid grid-cols-1 gap-3 md:grid-cols-3">
{apps.map((app) => {
return <AppCard key={app.slug} app={app} />;
})}
{apps
.sort((a, b) => (b.installCount || 0) - (a.installCount || 0))
.map((app) => {
return <AppCard key={app.slug} app={app} />;
})}
</div>
</div>
</Shell>