Add proptypes, remove unused imports

This commit is contained in:
Alex Holliday committed 2024-08-20 10:55:54 -07:00
1 parent 8b87bf3c9e
commit a11202d612
2 files changed
+6 -4

No files matched your search

+6 -1
View File
@@ -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
-3
View File
@@ -1,9 +1,6 @@
import Fallback from "../../Components/Fallback";
import { useTheme } from "@emotion/react";
const Status = () => {
const theme = useTheme();
return (
<div className="status">
<Fallback