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( const groupedChecks =
(acc, check) => { healthData?.checks && Array.isArray(healthData.checks)
if (!acc[check.category]) { ? healthData.checks.reduce(
acc[check.category] = [] (acc, check) => {
} if (!acc[check.category]) {
acc[check.category].push(check) acc[check.category] = []
return acc }
}, acc[check.category].push(check)
{} as Record<string, HealthCheck[]>, return acc
) },
{} as Record<string, HealthCheck[]>,
)
: {}
return ( return (
<Dialog open={open} onOpenChange={onOpenChange}> <Dialog open={open} onOpenChange={onOpenChange}>