Skip to content

Commit

Permalink
resolve pagination issue for 16 entries
Browse files Browse the repository at this point in the history
  • Loading branch information
mnshrm committed Nov 11, 2024
1 parent 8c5d38b commit 582e926
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Common/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const Pagination = ({
};

const totalCount = data.totalCount;
if (!totalCount || totalCount < rowsPerPage) {
if (!totalCount || totalCount <= rowsPerPage) {
return null;
}
const totalPage = Math.ceil(totalCount / rowsPerPage);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Facility/FacilityStaffList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import useQuery from "@/Utils/request/useQuery";
export const FacilityStaffList = (props: any) => {
const { t } = useTranslation();
const [doctorCapacityModalOpen, setDoctorCapacityModalOpen] = useState(false);
const { qParams, resultsPerPage, updatePage } = useFilters({ limit: 16 });
const { qParams, resultsPerPage, updatePage } = useFilters({ limit: 15 });
const [totalDoctors, setTotalDoctors] = useState(0);

const { data: doctorsList, refetch } = useQuery(routes.listDoctor, {
Expand Down

0 comments on commit 582e926

Please sign in to comment.