add pagination
This commit is contained in:
1 parent
724f1c98d6
commit
960b5330e0
3 files changed
+28
-5
No files matched your search
@@ -5,7 +5,7 @@ import { useTheme } from "@emotion/react";
|
||||
import { useMonitorUtils } from "../../../../Hooks/useMonitorUtils";
|
||||
import { createToast } from "../../../../Utils/toastUtils";
|
||||
|
||||
const useSubscribeToMonitors = () => {
|
||||
const useSubscribeToMonitors = (page, rowsPerPage) => {
|
||||
// Redux
|
||||
const { user } = useSelector((state) => state.auth);
|
||||
|
||||
@@ -25,8 +25,8 @@ const useSubscribeToMonitors = () => {
|
||||
teamId: user.teamId,
|
||||
limit: 25,
|
||||
types: ["distributed_http"],
|
||||
page: 0,
|
||||
rowsPerPage: 10,
|
||||
page,
|
||||
rowsPerPage,
|
||||
filter: null,
|
||||
field: null,
|
||||
order: null,
|
||||
@@ -56,7 +56,7 @@ const useSubscribeToMonitors = () => {
|
||||
});
|
||||
setNetworkError(true);
|
||||
}
|
||||
}, [user, getMonitorWithPercentage, theme, isLoading]);
|
||||
}, [user, getMonitorWithPercentage, theme, isLoading, page, rowsPerPage]);
|
||||
return [isLoading, networkError, monitors, monitorsSummary, filteredMonitors];
|
||||
};
|
||||
export { useSubscribeToMonitors };
|
||||
Reference in new issue
Block a user