Skip to content

Commit

Permalink
Merge pull request #1532 from bluewave-labs/hotfix/fe/pagination
Browse files Browse the repository at this point in the history
hotfix: use redux state for pagination
  • Loading branch information
ajhollid authored Jan 8, 2025
2 parents ac839ca + 8d8082b commit 61ee7a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Client/src/Pages/Uptime/Home/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
getUptimeSummaryByTeamId,
getUptimeMonitorsByTeamId,
} from "../../../Features/UptimeMonitors/uptimeMonitorsSlice";
import { setRowsPerPage } from "../../../Features/UI/uiSlice";
import { useIsAdmin } from "../../../Hooks/useIsAdmin";
import { useSelector, useDispatch } from "react-redux";
import { useNavigate } from "react-router-dom";
Expand All @@ -25,13 +26,12 @@ const BREADCRUMBS = [{ name: `Uptime`, path: "/uptime" }];

const UptimeMonitors = () => {
// Redux state

const rowsPerPage = useSelector((state) => state.ui.monitors.rowsPerPage);
// Local state
const [monitors, setMonitors] = useState([]);
const [sort, setSort] = useState({});
const [search, setSearch] = useState("");
const [page, setPage] = useState(0);
const [rowsPerPage, setRowsPerPage] = useState(10);
const [isSearching, setIsSearching] = useState(false);
const [monitorUpdateTrigger, setMonitorUpdateTrigger] = useState(false);

Expand Down

0 comments on commit 61ee7a1

Please sign in to comment.