add prediction submission checkmark to player list
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user