integrate jury display, bingo announcements, leaderboard in display route
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,8 +3,10 @@ import { createFileRoute } from "@tanstack/react-router"
|
||||
import { useWebSocket } from "@/hooks/use-websocket"
|
||||
import { useRoomStore } from "@/stores/room-store"
|
||||
import { PlayerList } from "@/components/player-list"
|
||||
import { JuryDisplay } from "@/components/jury-display"
|
||||
import { BingoDisplay } from "@/components/bingo-display"
|
||||
import { Leaderboard } from "@/components/leaderboard"
|
||||
import { RoomHeader } from "@/components/room-header"
|
||||
import { ACT_LABELS } from "@celebrate-esc/shared"
|
||||
|
||||
export const Route = createFileRoute("/display/$roomCode")({
|
||||
component: DisplayView,
|
||||
@@ -40,15 +42,28 @@ function DisplayView() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{room.currentAct !== "lobby" && room.currentAct !== "ended" && room.currentAct !== "pre-show" && (
|
||||
<div className="flex flex-col items-center gap-4 py-12">
|
||||
<p className="text-2xl text-muted-foreground">{ACT_LABELS[room.currentAct]}</p>
|
||||
{room.currentAct === "live-event" && gameState && (
|
||||
<div className="flex flex-col items-center gap-8">
|
||||
<JuryDisplay
|
||||
currentRound={gameState.currentJuryRound}
|
||||
results={gameState.juryResults}
|
||||
/>
|
||||
<BingoDisplay announcements={gameState.bingoAnnouncements} />
|
||||
<Leaderboard entries={gameState.leaderboard} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
{room.currentAct === "scoring" && gameState && (
|
||||
<div className="flex flex-col items-center gap-8">
|
||||
<p className="text-2xl text-muted-foreground">Scoring</p>
|
||||
<Leaderboard entries={gameState.leaderboard} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
{room.currentAct === "ended" && (
|
||||
<div className="flex flex-col items-center gap-4 py-12">
|
||||
<p className="text-2xl text-muted-foreground">The party has ended. Thanks for playing!</p>
|
||||
{gameState && <Leaderboard entries={gameState.leaderboard} />}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user