diff --git a/admin-compliance/app/sdk/agent/_components/BannerCheckTab.tsx b/admin-compliance/app/sdk/agent/_components/BannerCheckTab.tsx index 5b73d43..9cf7d45 100644 --- a/admin-compliance/app/sdk/agent/_components/BannerCheckTab.tsx +++ b/admin-compliance/app/sdk/agent/_components/BannerCheckTab.tsx @@ -57,25 +57,7 @@ export function BannerCheckTab() { }) if (!res.ok) throw new Error(`Fehler: ${res.status}`) const data = await res.json() - - if (data.scan_id) { - let attempts = 0 - while (attempts < 60) { - await new Promise(r => setTimeout(r, 3000)) - const poll = await fetch(`/api/sdk/v1/agent/banner-check?scan_id=${data.scan_id}`) - if (!poll.ok) { attempts++; continue } - const pollData = await poll.json() - if (pollData.progress) setProgress(pollData.progress) - if (pollData.status === 'completed' && pollData.result) { - setResult(pollData.result) - break - } - if (pollData.status === 'failed') throw new Error(pollData.error || 'Scan fehlgeschlagen') - attempts++ - } - } else { - setResult(data) - } + setResult(data) } catch (e) { setError(e instanceof Error ? e.message : 'Unbekannter Fehler') } finally {