mirror of
https://github.com/ReVanced/revanced-website.git
synced 2026-01-11 05:36:17 +00:00
refactor: improve package sorting
This commit is contained in:
@@ -48,9 +48,8 @@ async function patches(): Promise<PatchesData> {
|
||||
}
|
||||
|
||||
// sort packages by patch count to get most relevant apps on top
|
||||
const packages = Object.entries(packagesWithCount)
|
||||
.sort((a, b) => b[1] - a[1])
|
||||
.map((pkg) => pkg[0]);
|
||||
const packages = Object.keys(packagesWithCount);
|
||||
packages.sort((a, b) => packagesWithCount[b] - packagesWithCount[a]);
|
||||
|
||||
return { patches: json.patches, packages };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user