diff --git a/app/components/play/MapList.tsx b/app/components/play/MapList.tsx index 92b507a6d..7b087d76a 100644 --- a/app/components/play/MapList.tsx +++ b/app/components/play/MapList.tsx @@ -78,7 +78,9 @@ export function MapList({ mapList, canSubmitScore, groupIds }: MapListProps) { ); })} - {canSubmitScore && } + {canSubmitScore && ( + + )} ); } @@ -86,9 +88,14 @@ export function MapList({ mapList, canSubmitScore, groupIds }: MapListProps) { function Submitter({ mapList, winners, + groupIds, }: { mapList: MapListProps["mapList"]; winners: string[]; + groupIds: { + our: string; + their: string; + }; }) { const warningText = scoreValid(winners, mapList.length) ? undefined @@ -98,10 +105,9 @@ function Submitter({ return
{warningText}
; } - const ids = Array.from(new Set(winners)); const score = winners.reduce( (acc: [number, number], winnerId) => { - if (winnerId === ids[0]) acc[0]++; + if (winnerId === groupIds.our) acc[0]++; else acc[1]++; return acc;