/** * Shown while a text is being written again after a failed attempt: it is * retried on its own, nothing to do. Admins also see the error. */ export function RetryNotice({ status, error, nextAttemptAt, isAdmin = false, }: { status: string; error?: string | null; nextAttemptAt?: string; isAdmin?: boolean; }) { if (!error || (status !== "pending" && status !== "running")) return null; const wait = nextAttemptAt ? Math.round((Date.parse(nextAttemptAt) - Date.now()) / 60_000) : 0; return (
Az előző próbálkozás nem sikerült, ezért automatikusan újrapróbáljuk. Nem kell újra kérned, és nem kerül többe. {status === "pending" && wait >= 1 ? ` A következő próbálkozás kb. ${wait} perc múlva indul.` : ""}
{isAdmin &&Hiba: {error}
}