Revert "Revert "Fix issues with limits. (pull request #1090)"

This commit is contained in:
Allan Carr
2023-11-30 00:22:20 +00:00
parent 4c38ddf3cd
commit 0852d55837
12 changed files with 32 additions and 23 deletions

View File

@@ -14,6 +14,7 @@ import {
setSelectedHeader,
} from "../../redux/application/application.actions";
import { selectBodyshop } from "../../redux/user/user.selectors";
import {pageLimit} from "../../utils/config";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
@@ -34,8 +35,8 @@ export function AllJobs({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
fetchPolicy: "network-only",
nextFetchPolicy: "network-only",
variables: {
offset: page ? (page - 1) * 25 : 0,
limit: 25,
offset: page ? (page - 1) * pageLimit : 0,
limit: pageLimit,
order: [
searchObj
? JSON.parse(searchObj)