Skip to content

Commit

Permalink
Changes in code
Browse files Browse the repository at this point in the history
  • Loading branch information
chaitanyakole committed Dec 26, 2024
1 parent f5b4698 commit c3f8e6c
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/pages/tenant.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -379,15 +379,17 @@ const Tenant: React.FC = () => {
// setTotalCount(totalCount); // Set the total count

setPagination(totalCount >= 10);
setPageSizeArray(
totalCount > 15
? [5, 10, 15]
: totalCount >= 10
? [5, 10]
: totalCount > 5
? [5]
: []
);
let pageSizeArrayCount: any = [];

if (totalCount > 15) {
pageSizeArrayCount = [5, 10, 15];
} else if (totalCount >= 10) {
pageSizeArrayCount = [5, 10];
} else if (totalCount > 5) {
pageSizeArrayCount = [5];
}

setPageSizeArray(pageSizeArrayCount);
const pageCount = Math.ceil(totalCount / pageLimit);
setPageCount(pageCount);
} else {
Expand Down Expand Up @@ -1276,8 +1278,6 @@ const Tenant: React.FC = () => {
setSelectedBlock: setSelectedBlock,
};

console.log(totalCount >= Numbers.TEN, "totalCount > Numbers.FIVE");

return (
<>
<ConfirmationModal
Expand Down

0 comments on commit c3f8e6c

Please sign in to comment.