Sort In Contention by ownership then name
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 3m13s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Successful in 1m30s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped

In the bracket "In Contention" table, list players drafted by a manager
first, then alphabetically by player name.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Chris Parsons 2026-06-27 08:49:49 -07:00
parent 764d70af3a
commit b8165cef3e

View file

@ -284,7 +284,14 @@ export function PlayoffBracket({
const activeParticipants = [...allBracketParticipantIds] const activeParticipants = [...allBracketParticipantIds]
.filter((id) => !rankedParticipantIds.has(id)) .filter((id) => !rankedParticipantIds.has(id))
.map((id) => participantMap.get(id)) .map((id) => participantMap.get(id))
.filter((p): p is Participant => p !== undefined); .filter((p): p is Participant => p !== undefined)
// Owned-by-a-manager players first, then alphabetical by name.
.sort((a, b) => {
const aOwned = ownershipMap.has(a.id);
const bOwned = ownershipMap.has(b.id);
if (aOwned !== bOwned) return aOwned ? -1 : 1;
return a.name.localeCompare(b.name);
});
const isDraftedOrScoring = (participantId: string) => const isDraftedOrScoring = (participantId: string) =>
ownershipMap.has(participantId) || (pointsMap.get(participantId) ?? 0) > 0; ownershipMap.has(participantId) || (pointsMap.get(participantId) ?? 0) > 0;