mirror of
https://github.com/zvx-echo6/meshai.git
synced 2026-05-21 15:14:45 +02:00
fix(dashboard): add null checks for health.pillars
Prevents "e.pillars is undefined" crash when health object doesn't have pillars property (e.g., during initial load or if API response is malformed). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
d1511a74b9
commit
7704923b8c
1 changed files with 4 additions and 4 deletions
|
|
@ -383,10 +383,10 @@ export default function Dashboard() {
|
|||
<>
|
||||
<HealthGauge health={health} />
|
||||
<div className="mt-6 space-y-3">
|
||||
<PillarBar label="Infrastructure" value={health.pillars.infrastructure} />
|
||||
<PillarBar label="Utilization" value={health.pillars.utilization} />
|
||||
<PillarBar label="Behavior" value={health.pillars.behavior} />
|
||||
<PillarBar label="Power" value={health.pillars.power} />
|
||||
<PillarBar label="Infrastructure" value={health.pillars?.infrastructure ?? 0} />
|
||||
<PillarBar label="Utilization" value={health.pillars?.utilization ?? 0} />
|
||||
<PillarBar label="Behavior" value={health.pillars?.behavior ?? 0} />
|
||||
<PillarBar label="Power" value={health.pillars?.power ?? 0} />
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue