mirror of
https://github.com/HangarMC/Hangar.git
synced 2025-01-30 14:30:08 +08:00
Fix homepage version list sorting
This commit is contained in:
parent
d1969e0416
commit
79e7d68f60
1
.gitignore
vendored
1
.gitignore
vendored
@ -32,4 +32,3 @@ build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
|
@ -78,12 +78,14 @@ async function updateProjects() {
|
||||
}
|
||||
|
||||
function versions(platform: Platform) {
|
||||
return backendData.platforms
|
||||
?.get(platform)
|
||||
?.possibleVersions.sort((a, b) => toNumber(b.substring(2)) - toNumber(a.substring(2)))
|
||||
.map((k) => {
|
||||
return { version: k };
|
||||
});
|
||||
const platformData = backendData.platforms?.get(platform);
|
||||
if (!platformData) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return [...platformData.possibleVersions].reverse().map((k) => {
|
||||
return { version: k };
|
||||
});
|
||||
}
|
||||
|
||||
const meta = useSeo("Home", null, route, null);
|
||||
|
Loading…
Reference in New Issue
Block a user