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
|
// sort packages by patch count to get most relevant apps on top
|
||||||
const packages = Object.entries(packagesWithCount)
|
const packages = Object.keys(packagesWithCount);
|
||||||
.sort((a, b) => b[1] - a[1])
|
packages.sort((a, b) => packagesWithCount[b] - packagesWithCount[a]);
|
||||||
.map((pkg) => pkg[0]);
|
|
||||||
|
|
||||||
return { patches: json.patches, packages };
|
return { patches: json.patches, packages };
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user