mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-10 11:49:49 -06:00
fix state initialization, add proptype
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user