remove unused dispatch from pagespeed
This commit is contained in:
1 parent
61ee7a1059
commit
cf5152d0ec
1 file changed
+1
-6
@@ -1,8 +1,7 @@
|
|||||||
import { Box, Button, Grid, Stack } from "@mui/material";
|
import { Box, Button, Grid, Stack } from "@mui/material";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import { getPageSpeedByTeamId } from "../../Features/PageSpeedMonitor/pageSpeedMonitorSlice";
|
|
||||||
import Fallback from "../../Components/Fallback";
|
import Fallback from "../../Components/Fallback";
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
import { useNavigate } from "react-router";
|
import { useNavigate } from "react-router";
|
||||||
@@ -15,16 +14,12 @@ import { Heading } from "../../Components/Heading";
|
|||||||
import { useIsAdmin } from "../../Hooks/useIsAdmin";
|
import { useIsAdmin } from "../../Hooks/useIsAdmin";
|
||||||
const PageSpeed = () => {
|
const PageSpeed = () => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const dispatch = useDispatch();
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const isAdmin = useIsAdmin();
|
const isAdmin = useIsAdmin();
|
||||||
const { user, authToken } = useSelector((state) => state.auth);
|
const { user, authToken } = useSelector((state) => state.auth);
|
||||||
const [isLoading, setIsLoading] = useState(true);
|
const [isLoading, setIsLoading] = useState(true);
|
||||||
const [monitors, setMonitors] = useState([]);
|
const [monitors, setMonitors] = useState([]);
|
||||||
const [monitorCount, setMonitorCount] = useState(0);
|
const [monitorCount, setMonitorCount] = useState(0);
|
||||||
useEffect(() => {
|
|
||||||
dispatch(getPageSpeedByTeamId(authToken));
|
|
||||||
}, [authToken, dispatch]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const fetchMonitors = async () => {
|
const fetchMonitors = async () => {
|
||||||
|
|||||||
Reference in new issue
Block a user