Add proptypes

This commit is contained in:
Alex Holliday
2024-08-19 11:35:12 -07:00
parent 1250bf9421
commit 592169d94f

View File

@@ -27,6 +27,7 @@ import {
} from "@mui/material";
import Settings from "../../assets/icons/settings-bold.svg?react";
import PropTypes from "prop-types";
const ActionsMenu = ({ monitor }) => {
const [anchorEl, setAnchorEl] = useState(null);
@@ -192,6 +193,14 @@ const ActionsMenu = ({ monitor }) => {
);
};
ActionsMenu.propTypes = {
monitor: PropTypes.shape({
_id: PropTypes.string,
url: PropTypes.string,
type: PropTypes.string,
}).isRequired,
};
/**
* Host component.
* This subcomponent receives a params object and displays the host details.
@@ -237,6 +246,15 @@ const Host = ({ params }) => {
);
};
Host.propTypes = {
params: PropTypes.shape({
url: PropTypes.string,
title: PropTypes.string,
percentageColor: PropTypes.string,
percentage: PropTypes.number,
}).isRequired,
};
/**
* Renders a skeleton layout.
*