import { useState } from 'react'; import { Dialog } from '../Dialog/Dialog'; type BackendStatus = 'checking' | 'unavailable'; interface BackendConnectionDialogProps { backendStatus: BackendStatus; message: string; } export function BackendConnectionDialog({ backendStatus, message }: BackendConnectionDialogProps) { const [open, setOpen] = useState(true); if (!open) return null; const title = backendStatus === 'checking' ? 'Checking server connection' : 'Backend is unreachable'; return setOpen(false)} className="backend-connection-dialog">

{message}

The connection is checked automatically.

; }