import { useGame } from '../useGame' import type { Session } from '../types' import { Lobby } from './Lobby' import { ShopPhase } from './ShopPhase' import { ArrangePhase } from './ArrangePhase' import { BattlePhase } from './BattlePhase' import { GameOver } from './GameOver' import { DebugPanel } from './DebugPanel' import { EventLog } from './EventLog' // Table connects to the game and routes to the right phase screen. export function Table({ session, onLeave }: { session: Session; onLeave: () => void }) { const { view, error, connected, send } = useGame(session) if (!view) { return (