Skip to content

Commit

Permalink
updated offset
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaJ2305 committed Jan 24, 2025
1 parent 58cf12e commit 93a1957
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/pages/Organization/OrganizationFacilities.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default function OrganizationFacilities({
queryParams: {
page: qParams.page,
limit: resultsPerPage,
offset: (qParams.page - 1) * resultsPerPage,
offset: ((qParams.page ?? 1) - 1) * resultsPerPage,
organization: id,
name: qParams.name,
...advancedFilter.filter,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Organization/OrganizationPatients.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default function OrganizationPatients({ id, navOrganizationId }: Props) {
...(organization?.org_type === "govt" && { organization: id }),
page: qParams.page,
limit: resultsPerPage,
offset: (qParams.page - 1) * resultsPerPage,
offset: ((qParams.page ?? 1) - 1) * resultsPerPage,
...advancedFilter.filter,
},
}),
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Organization/OrganizationUsers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function OrganizationUsers({ id, navOrganizationId }: Props) {
queryParams: {
username: qParams.search,
limit: resultsPerPage,
offset: (qParams.page - 1) * resultsPerPage,
offset: ((qParams.page ?? 1) - 1) * resultsPerPage,
},
}),
enabled: !!id,
Expand Down

0 comments on commit 93a1957

Please sign in to comment.