mirror of
https://github.com/revanced/revanced-website.git
synced 2025-04-30 06:34:35 +02:00
refactor: improve package sorting
This commit is contained in:
parent
7d3c409fdf
commit
7692381ed2
@ -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 };
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user