Skip to content

Commit dcbbd17

Browse files
committed
moved the sort to ssleaderboard
1 parent 2d055c5 commit dcbbd17

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

src/pages/lb/[id].astro

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -633,14 +633,7 @@ const name = isBB ? `Boss Blitz S${season}` : `Finale Echoing S${season}`;
633633

634634
modalContent.innerHTML = '';
635635

636-
const users = (item.users || []).slice();
637-
users.sort((a, b) => {
638-
const aScore = Math.abs(a.teamScore || 0);
639-
const bScore = Math.abs(b.teamScore || 0);
640-
return isBB ? bScore - aScore : aScore - bScore;
641-
});
642-
643-
const rowsHtml = users
636+
const rowsHtml = item.users
644637
.map((u) => {
645638
const entry = (regionData.Rank || []).find((e) => String(e.Id) === String(u.id)) || (regionData.Self && String(regionData.Self.Id) === String(u.id) ? regionData.Self : null);
646639
const dataEntry = entry ? `data-entry='${JSON.stringify(entry).replace(/'/g, ''')}'` : '';

0 commit comments

Comments
 (0)