diff --git a/apps/web/src/components/game-end-view.tsx b/apps/web/src/components/game-end-view.tsx index 1434dab..daba468 100644 --- a/apps/web/src/components/game-end-view.tsx +++ b/apps/web/src/components/game-end-view.tsx @@ -232,7 +232,7 @@ export function GameEndView({ snapshot }: { snapshot: RoomSnapshot }) { )} {gameRecap && gameRecap.length > 0 && ( - + )}
@@ -322,9 +322,11 @@ function TracksRecap({ tracks }: { tracks: BlindtestTrackInfo[] }) { function RoundsRecap({ recap, nameOf, + playerId, }: { recap: RoundRecap[] nameOf: (id: string) => string + playerId: string | null }) { return (
@@ -334,6 +336,13 @@ function RoundsRecap({
    {recap.map((r) => { const pointsBy = new Map(r.scorers.map((s) => [s.playerId, s.points])) + const found = r.answers.filter((a) => a.correct).length + // Tri : plus de points d'abord, puis bonnes réponses. + const answers = [...r.answers].sort( + (a, b) => + (pointsBy.get(b.playerId) ?? 0) - (pointsBy.get(a.playerId) ?? 0) || + Number(b.correct) - Number(a.correct) + ) return (
  • {r.youtubeId ? ( @@ -353,6 +362,8 @@ function RoundsRecap({

    {r.index + 1} ·{" "} {r.category ?? (r.type === "blindtest" ? "Blindtest" : "Quiz")} + {" · "} + ✓ {found}

    {r.type !== "blindtest" && (

    {r.label}

    @@ -367,15 +378,22 @@ function RoundsRecap({ )}

      - {r.answers.length === 0 ? ( + {answers.length === 0 ? (
    • Aucune réponse
    • ) : ( - r.answers.map((a) => ( + answers.map((a) => (
    • - - {nameOf(a.playerId)} :{" "} + + {nameOf(a.playerId)} + {a.playerId === playerId && " (toi)"} :{" "}