diff --git a/packages/client/src/routes/display.$roomCode.tsx b/packages/client/src/routes/display.$roomCode.tsx index c6c4640..8c8395f 100644 --- a/packages/client/src/routes/display.$roomCode.tsx +++ b/packages/client/src/routes/display.$roomCode.tsx @@ -7,6 +7,7 @@ import { JuryDisplay } from "@/components/jury-display" import { BingoDisplay } from "@/components/bingo-display" import { Leaderboard } from "@/components/leaderboard" import { RoomHeader } from "@/components/room-header" +import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" export const Route = createFileRoute("/display/$roomCode")({ component: DisplayView, @@ -49,21 +50,67 @@ function DisplayView() { results={gameState.juryResults} /> - + )} {room.currentAct === "scoring" && gameState && (

Scoring

- + {gameState?.actualResults && ( + + + Actual Results + + + {[ + { label: "Winner", code: gameState.actualResults.winner }, + { label: "2nd", code: gameState.actualResults.second }, + { label: "3rd", code: gameState.actualResults.third }, + { label: "Last", code: gameState.actualResults.last }, + ].map(({ label, code }) => { + const entry = gameState.lineup.entries.find((e) => e.country.code === code) + return ( +
+ {label} + {entry ? `${entry.country.flag} ${entry.country.name}` : code} +
+ ) + })} +
+
+ )} +
)} {room.currentAct === "ended" && (

The party has ended. Thanks for playing!

- {gameState && } + {gameState?.actualResults && ( + + + Actual Results + + + {[ + { label: "Winner", code: gameState.actualResults.winner }, + { label: "2nd", code: gameState.actualResults.second }, + { label: "3rd", code: gameState.actualResults.third }, + { label: "Last", code: gameState.actualResults.last }, + ].map(({ label, code }) => { + const entry = gameState.lineup.entries.find((e) => e.country.code === code) + return ( +
+ {label} + {entry ? `${entry.country.flag} ${entry.country.name}` : code} +
+ ) + })} +
+
+ )} + {gameState && }
)}