import React from 'react'; import { Player } from '../types'; import { motion, AnimatePresence } from 'framer-motion'; import { Sparkles, User } from 'lucide-react'; import { PlayerAvatar } from './PlayerAvatar'; interface LobbyProps { quizTitle: string; players: Player[]; gamePin: string | null; role: 'HOST' | 'CLIENT'; onStart: () => void; } export const Lobby: React.FC = ({ quizTitle, players, gamePin, role, onStart }) => { const isHost = role === 'HOST'; const realPlayers = players.filter(p => p.id !== 'host'); return (
Game PIN
{gamePin}
{quizTitle}
Live Lobby
{realPlayers.length} Players
{isHost ? ( <>
{realPlayers.length === 0 && (
Waiting for players to join...
)} {realPlayers.map((player) => ( {player.name} ))}
) : (

You're in!

See your name on the big screen?

)}
); };