wire ActualResultsForm and prediction results in host route

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-12 22:18:15 +01:00
parent 01f78e920e
commit ec7e6fd869

View File

@@ -6,6 +6,7 @@ import { PredictionsForm } from "@/components/predictions-form"
import { JuryHost } from "@/components/jury-host"
import { JuryVoting } from "@/components/jury-voting"
import { BingoCard } from "@/components/bingo-card"
import { ActualResultsForm } from "@/components/actual-results-form"
import { Leaderboard } from "@/components/leaderboard"
import { RoomHeader } from "@/components/room-header"
import { Button } from "@/components/ui/button"
@@ -106,8 +107,18 @@ function HostView() {
</Tabs>
)}
{gameState && (room.currentAct === "scoring" || room.currentAct === "ended") && gameState.myPrediction && (
<PredictionsForm
entries={gameState.lineup.entries}
existingPrediction={gameState.myPrediction}
locked={true}
actualResults={gameState.actualResults}
onSubmit={() => {}}
/>
)}
{gameState && (room.currentAct === "scoring" || room.currentAct === "ended") && (
<Leaderboard entries={gameState.leaderboard} />
<Leaderboard entries={gameState.leaderboard} resultsEntered={!!gameState.actualResults} />
)}
<PlayerList
@@ -171,7 +182,14 @@ function HostView() {
/>
)}
{gameState && (room.currentAct === "scoring" || room.currentAct === "ended") && (
<Leaderboard entries={gameState.leaderboard} />
<ActualResultsForm
entries={gameState.lineup.entries}
existingResults={gameState.actualResults}
onSubmit={(results) => send({ type: "submit_actual_results", ...results })}
/>
)}
{gameState && (room.currentAct === "scoring" || room.currentAct === "ended") && (
<Leaderboard entries={gameState.leaderboard} resultsEntered={!!gameState.actualResults} />
)}
</CardContent>
</Card>