diff --git a/src/Web/autopilot-monitor-web/app/settings/components/HardwareRejectionInsights.tsx b/src/Web/autopilot-monitor-web/app/settings/components/HardwareRejectionInsights.tsx index cda22669..2423b64b 100644 --- a/src/Web/autopilot-monitor-web/app/settings/components/HardwareRejectionInsights.tsx +++ b/src/Web/autopilot-monitor-web/app/settings/components/HardwareRejectionInsights.tsx @@ -43,6 +43,45 @@ function formatDate(iso: string): string { } } +function WebhookToggle({ + checked, + onChange, + hasWebhook, +}: { + checked: boolean; + onChange: (value: boolean) => void; + hasWebhook: boolean; +}) { + return ( + + ); +} + export default function HardwareRejectionInsights({ getAccessToken, onAddManufacturer, @@ -107,176 +146,155 @@ export default function HardwareRejectionInsights({ ); } - // Empty state - if (!data || data.aggregated.length === 0) { - return ( -
- No hardware rejections in the last 14 days -
-- Devices that attempted to connect but were not in your whitelist -
+ {hasRejections && ( ++ Devices that attempted to connect but were not in your whitelist +
+ )}