add prediction submission checkmark to player list

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-12 17:40:23 +01:00
parent 4489c774e5
commit c49b41c64e

View File

@@ -4,9 +4,10 @@ import type { Player } from "@celebrate-esc/shared"
interface PlayerListProps {
players: Player[]
mySessionId: string | null
predictionSubmitted?: Record<string, boolean>
}
export function PlayerList({ players, mySessionId }: PlayerListProps) {
export function PlayerList({ players, mySessionId, predictionSubmitted }: PlayerListProps) {
return (
<div className="flex flex-col gap-2">
<h3 className="text-sm font-medium text-muted-foreground">Players ({players.length})</h3>
@@ -27,6 +28,9 @@ export function PlayerList({ players, mySessionId }: PlayerListProps) {
{player.sessionId === mySessionId && (
<span className="text-xs text-muted-foreground">(you)</span>
)}
{predictionSubmitted?.[player.id] && (
<span className="text-green-600" title="Prediction submitted"></span>
)}
</li>
))}
</ul>