import React from 'react'; import { motion, AnimatePresence } from 'framer-motion'; import { Play, Users, X, Wifi, WifiOff } from 'lucide-react'; import { Player } from '../types'; import { PlayerAvatar } from './PlayerAvatar'; interface HostReconnectedProps { quizTitle: string; currentQuestionIndex: number; totalQuestions: number; players: Player[]; onResume: () => void; onEndGame: () => void; connectedPlayerIds: string[]; } export const HostReconnected: React.FC = ({ quizTitle, currentQuestionIndex, totalQuestions, players, onResume, onEndGame, connectedPlayerIds, }) => { const realPlayers = players.filter(p => p.id !== 'host'); const connectedCount = connectedPlayerIds.length; const totalCount = realPlayers.length; return (

Game Restored

{quizTitle}

Question

{currentQuestionIndex + 1} / {totalQuestions}

Connected

{connectedCount} / {totalCount}

{/* Player list showing connection status */} {realPlayers.length > 0 && (
{realPlayers.map((player) => { const isConnected = connectedPlayerIds.includes(player.id); return ( {isConnected ? ( ) : ( )} {player.name} ); })}
)}

Players will rejoin automatically when they reconnect

Resume Game End Game
); };