diff --git a/client/src/Pages/Infrastructure/Details/Components/GaugeBoxes/index.jsx b/client/src/Pages/Infrastructure/Details/Components/GaugeBoxes/index.jsx index 4dd978018..3c1c68f8b 100644 --- a/client/src/Pages/Infrastructure/Details/Components/GaugeBoxes/index.jsx +++ b/client/src/Pages/Infrastructure/Details/Components/GaugeBoxes/index.jsx @@ -2,18 +2,19 @@ import { Stack } from "@mui/material"; import Gauge from "./Gauge"; import SkeletonLayout from "./skeleton"; +import PropTypes from "prop-types"; // Utils import { useHardwareUtils } from "../../Hooks/useHardwareUtils"; import { useTheme } from "@emotion/react"; import { useTranslation } from "react-i18next"; -const Gauges = ({ shouldRender, monitor }) => { +const Gauges = ({ isLoading = false, monitor }) => { const { decimalToPercentage, formatBytes } = useHardwareUtils(); const theme = useTheme(); const { t } = useTranslation(); - if (!shouldRender) { + if (isLoading) { return ; } @@ -60,6 +61,7 @@ const Gauges = ({ shouldRender, monitor }) => { return ( {gauges.map((gauge) => { @@ -79,4 +81,9 @@ const Gauges = ({ shouldRender, monitor }) => { ); }; +Gauges.propTypes = { + isLoading: PropTypes.bool, + monitor: PropTypes.object, +}; + export default Gauges; diff --git a/client/src/Pages/Infrastructure/Details/index.jsx b/client/src/Pages/Infrastructure/Details/index.jsx index b57e0b91e..30840851f 100644 --- a/client/src/Pages/Infrastructure/Details/index.jsx +++ b/client/src/Pages/Infrastructure/Details/index.jsx @@ -92,11 +92,11 @@ const InfrastructureDetails = () => { monitor={monitor} />