Add comment explaining why monitor.type must remain optional in PropTypes
This commit is contained in:
1 parent
5ba82415ad
commit
1f804a725e
1 file changed
+4
-2
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user