From a11202d6120d376239db85b116415c9ef421d585 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Tue, 20 Aug 2024 10:55:54 -0700 Subject: [PATCH] Add proptypes, remove unused imports --- Client/src/Pages/PageSpeed/index.jsx | 7 ++++++- Client/src/Pages/Status/index.jsx | 3 --- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Client/src/Pages/PageSpeed/index.jsx b/Client/src/Pages/PageSpeed/index.jsx index 771a692c1..368ae2062 100644 --- a/Client/src/Pages/PageSpeed/index.jsx +++ b/Client/src/Pages/PageSpeed/index.jsx @@ -11,6 +11,7 @@ import "./index.css"; import Button from "../../Components/Button"; import { useNavigate } from "react-router"; import { getLastChecked } from "../../Utils/monitorUtils"; +import PropTypes from "prop-types"; const Card = ({ data }) => { const theme = useTheme(); @@ -57,6 +58,10 @@ const Card = ({ data }) => { ); }; +Card.propTypes = { + data: PropTypes.object.isRequired, +}; + /** * Renders a skeleton layout. * @@ -129,7 +134,7 @@ const PageSpeed = () => { ); useEffect(() => { dispatch(getPageSpeedByUserId(authToken)); - }, []); + }, [authToken, dispatch]); // will show skeletons only on initial load // since monitor state is being added to redux persist, there's no reason to display skeletons on every render diff --git a/Client/src/Pages/Status/index.jsx b/Client/src/Pages/Status/index.jsx index 474375ede..d280132c4 100644 --- a/Client/src/Pages/Status/index.jsx +++ b/Client/src/Pages/Status/index.jsx @@ -1,9 +1,6 @@ import Fallback from "../../Components/Fallback"; -import { useTheme } from "@emotion/react"; const Status = () => { - const theme = useTheme(); - return (