import { Button } from "~/components/ui/button"; import { Card } from "~/components/ui/card"; interface ConnectionOverlayProps { isConnected: boolean; isReconnecting: boolean; connectionError: string | null; isSyncing: boolean; } export function ConnectionOverlay({ isConnected, isReconnecting, connectionError, isSyncing, }: ConnectionOverlayProps) { if (isConnected && !isSyncing) { return null; } return (
{connectionError ? ( connectionError ) : isSyncing ? ( "Reconnected. Syncing the latest draft state..." ) : isReconnecting ? ( "Lost connection to the draft server. Attempting to reconnect..." ) : ( "Please wait while we connect you to the live draft room." )}