fix: Remove floating 0 on Environment page
React renders 0 when using {0 && ...} pattern. Changed to proper
boolean comparison: {value !== undefined && value > 0 && (...)}
This commit is contained in:
parent
f2dc7526e7
commit
e7d23f4c7f
1 changed files with 1 additions and 1 deletions
|
|
@ -226,7 +226,7 @@ export default function EnvironmentDashboard() {
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Active Alerts from database */}
|
{/* Active Alerts from database */}
|
||||||
{dashboard?.alerts.active && dashboard.alerts.active > 0 && (
|
{dashboard?.alerts?.active !== undefined && dashboard.alerts.active > 0 && (
|
||||||
<div className="card p-4 border-destructive/50 bg-destructive-muted">
|
<div className="card p-4 border-destructive/50 bg-destructive-muted">
|
||||||
<div className="flex items-center gap-2 mb-3">
|
<div className="flex items-center gap-2 mb-3">
|
||||||
<AlertTriangle className="text-destructive" size={18} />
|
<AlertTriangle className="text-destructive" size={18} />
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue