diff --git a/Client/src/Pages/PageSpeed/index.jsx b/Client/src/Pages/PageSpeed/index.jsx
index 8e0f111bb..b4056ffce 100644
--- a/Client/src/Pages/PageSpeed/index.jsx
+++ b/Client/src/Pages/PageSpeed/index.jsx
@@ -11,7 +11,7 @@ import Breadcrumbs from "../../Components/Breadcrumbs";
import SkeletonLayout from "./skeleton";
import Card from "./card";
import { networkService } from "../../main";
-
+import { Heading } from "../../Components/Heading";
const PageSpeed = ({ isAdmin }) => {
const theme = useTheme();
const dispatch = useDispatch();
@@ -20,6 +20,7 @@ const PageSpeed = ({ isAdmin }) => {
const { user, authToken } = useSelector((state) => state.auth);
const [isLoading, setIsLoading] = useState(true);
const [monitors, setMonitors] = useState([]);
+ const [monitorCount, setMonitorCount] = useState(0);
useEffect(() => {
dispatch(getPageSpeedByTeamId(authToken));
}, [authToken, dispatch]);
@@ -44,6 +45,7 @@ const PageSpeed = ({ isAdmin }) => {
});
if (res?.data?.data?.monitors) {
setMonitors(res.data.data.monitors);
+ setMonitorCount(res.data.data.monitorCount);
}
} catch (error) {
console.log(error);
@@ -53,7 +55,7 @@ const PageSpeed = ({ isAdmin }) => {
};
fetchMonitors();
- }, []);
+ }, [authToken, user.teamId]);
// 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
@@ -76,8 +78,8 @@ const PageSpeed = ({ isAdmin }) => {
{isActuallyLoading ? (
) : monitors?.length !== 0 ? (
-
-
+
+
{
)}
+
+ PageSpeed monitors
+ {/* TODO Correct the class current-monitors-counter, there are some unnecessary things there */}
+
+ {monitorCount}
+
+
{
/>
))}
-
+
) : (