From da7a54244e52f5cb70b1b169324101e6ce63b236 Mon Sep 17 00:00:00 2001 From: Richard Bergsma Date: Wed, 11 Jun 2025 21:57:11 +0200 Subject: [PATCH] Refactor heartbeat color logic in UptimeStatusIsland component for improved status representation - Adjusted the color mapping for heartbeat statuses to enhance clarity: changed DOWN to red, PENDING to yellow, and maintained UP as green. - Simplified the logic for better readability and maintainability. --- src/components/UptimeStatusIsland.jsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/UptimeStatusIsland.jsx b/src/components/UptimeStatusIsland.jsx index 4a39957..38db80a 100644 --- a/src/components/UptimeStatusIsland.jsx +++ b/src/components/UptimeStatusIsland.jsx @@ -11,10 +11,9 @@ function getStatusColor(validCert) { } function getHeartbeatColor(status) { - if (status === 1) return 'bg-green-600'; // UP - if (status === 0) return 'bg-red-600'; // DOWN - if (status === 2) return 'bg-yellow-400'; // PENDING - if (status === 3) return 'bg-blue-500'; // MAINTENANCE + if (status === 1) return 'bg-green-600'; // UP + if (status === 0) return 'bg-yellow-400'; // PENDING + if (status === 2) return 'bg-red-600'; // DOWN return 'bg-gray-300'; }