From 028bd77c913f7282d6a1835415539a43c13f4393 Mon Sep 17 00:00:00 2001 From: Koushik Sai Date: Thu, 17 Aug 2023 01:13:37 +0530 Subject: [PATCH] feat: rank apps with most installed for a chosen category (#10756) --- apps/web/pages/apps/categories/[category].tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/web/pages/apps/categories/[category].tsx b/apps/web/pages/apps/categories/[category].tsx index c56a483dfd..da82248c82 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
- {apps.map((app) => { - return ; - })} + {apps + .sort((a, b) => (b.installCount || 0) - (a.installCount || 0)) + .map((app) => { + return ; + })}