Skip to content

Scheduling infrastructure for absolutely everyone.

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

Koushik Sai028bd77c913f
diff --git a/apps/web/pages/apps/categories/[category].tsx b/apps/web/pages/apps/categories/[category].tsx
index c56a483dfd3..da82248c823 100644
--- a/apps/web/pages/apps/categories/[category].tsx
+++ b/apps/web/pages/apps/categories/[category].tsx
@@ -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>