had opencode clean up all my nonsense comments too

This commit is contained in:
2026-06-29 15:11:53 +01:00
parent 3be0033a32
commit 201821d53c
21 changed files with 77 additions and 163 deletions

View File

@@ -44,20 +44,13 @@
const data = await response.json();
// Sort the players inside each bracket before returning the data
// Sort players: placed first (ascending), unplaced last
if (data && data[0] && data[0].registeredPlayers) {
data[0].registeredPlayers.forEach((bracket: any) => {
bracket.items.sort((a: any, b: any) => {
// 1. Both have no placement (placement === 0) -> keep original order
if (a.placement === 0 && b.placement === 0) return 0;
// 2. 'a' has no placement, but 'b' does -> move 'b' to the top
if (a.placement === 0) return 1;
// 3. 'a' has a placement, but 'b' doesn't -> keep 'a' on top
if (b.placement === 0) return -1;
// 4. Both have placements -> sort ascending (1st, 2nd, 3rd, etc.)
return a.placement - b.placement;
});
});