From 1f804a725e40387558efe24b28d4e0ebf98c01b1 Mon Sep 17 00:00:00 2001 From: mohadeseh safari Date: Sat, 28 Jun 2025 19:05:21 -0400 Subject: [PATCH] Add comment explaining why monitor.type must remain optional in PropTypes --- .../Monitors/Components/MonitorsTableMenu/index.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/Pages/Infrastructure/Monitors/Components/MonitorsTableMenu/index.jsx b/client/src/Pages/Infrastructure/Monitors/Components/MonitorsTableMenu/index.jsx index 36ca945c2..69911adca 100644 --- a/client/src/Pages/Infrastructure/Monitors/Components/MonitorsTableMenu/index.jsx +++ b/client/src/Pages/Infrastructure/Monitors/Components/MonitorsTableMenu/index.jsx @@ -211,8 +211,10 @@ InfrastructureMenu.propTypes = { monitor: PropTypes.shape({ id: PropTypes.string.isRequired, url: PropTypes.string, - type: PropTypes.string, // Made optional - isActive: PropTypes.bool, + // Note: type must remain optional. Making it required (type: PropTypes.string.isRequired) + // causes runtime errors as some monitors don't have a defined type property + type: PropTypes.string, + isActive: PropTypes.bool, // Consider deprecating in favor of status status: PropTypes.string, }).isRequired, isAdmin: PropTypes.bool.isRequired,