"use client"; import type { Room } from "../api/rooms/route"; type LobbyScreenProps = { room: Room; playerId: string; error: string | null; setError: (v: string | null) => void; loading: boolean; onLeave: () => void; onStart: () => void; onReset: () => void; }; export function LobbyScreen({ room, playerId, error, setError, loading, onLeave, onStart, onReset, }: LobbyScreenProps) { const isHost = room.players.find((p) => p.id === playerId)?.isHost ?? false; return (
Code de la salle {room.code} Partage ce code avec tes amis !
{error && (
{error}
)}

Joueurs ({room.players.length}/8)

{room.round > 0 &&
Manche {room.round} terminee
} {isHost ? (
{room.round > 0 && ( )}
) : (

En attente que l'hote demarre...

)}
); }