diff --git a/Client/src/Pages/Monitors/Home/MonitorTable/index.jsx b/Client/src/Pages/Monitors/Home/MonitorTable/index.jsx index ff8297848..8533ddacc 100644 --- a/Client/src/Pages/Monitors/Home/MonitorTable/index.jsx +++ b/Client/src/Pages/Monitors/Home/MonitorTable/index.jsx @@ -167,7 +167,7 @@ const MonitorTable = ({ isAdmin, filter, setLoading }) => { } }; fetchPage(); - }, [updateTrigger, authState, page, rowsPerPage, filter, sort]); + }, [updateTrigger, authState, page, rowsPerPage, filter, sort, setLoading]); /** * Helper function to calculate the range of displayed rows. @@ -408,6 +408,7 @@ const MonitorTable = ({ isAdmin, filter, setLoading }) => { MonitorTable.propTypes = { isAdmin: PropTypes.bool, filter: PropTypes.string, + setLoading: PropTypes.func, }; const MemoizedMonitorTable = memo(MonitorTable); diff --git a/Client/src/Pages/Monitors/Home/index.jsx b/Client/src/Pages/Monitors/Home/index.jsx index af439650b..c2a532bb9 100644 --- a/Client/src/Pages/Monitors/Home/index.jsx +++ b/Client/src/Pages/Monitors/Home/index.jsx @@ -27,7 +27,7 @@ const Monitors = ({ isAdmin }) => { const monitorState = useSelector((state) => state.uptimeMonitors); const authState = useSelector((state) => state.auth); const [search, setSearch] = useState(""); - const [isSearching, setIsSearching] = useState(""); + const [isSearching, setIsSearching] = useState(false); const dispatch = useDispatch({}); const debouncedFilter = useDebounce(search, 500);