Update health-status-modal.tsx

This commit is contained in:
MacRimi
2025-11-05 18:38:29 +01:00
parent 5b0d55c1a2
commit 876d51b009

View File

@@ -87,16 +87,19 @@ export function HealthStatusModal({ open, onOpenChange, getApiUrl }: HealthStatu
}
}
const groupedChecks = healthData?.checks.reduce(
(acc, check) => {
if (!acc[check.category]) {
acc[check.category] = []
}
acc[check.category].push(check)
return acc
},
{} as Record<string, HealthCheck[]>,
)
const groupedChecks =
healthData?.checks && Array.isArray(healthData.checks)
? healthData.checks.reduce(
(acc, check) => {
if (!acc[check.category]) {
acc[check.category] = []
}
acc[check.category].push(check)
return acc
},
{} as Record<string, HealthCheck[]>,
)
: {}
return (
<Dialog open={open} onOpenChange={onOpenChange}>