Skip to content

Commit

Permalink
Merge pull request #155 from Staketab/dev
Browse files Browse the repository at this point in the history
fix limit
  • Loading branch information
VitalikKarpuk authored Jul 9, 2024
2 parents 6bfd572 + 2035f71 commit 7ee7b6d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { addMinaText } from "@/helpers/name.helper";
import { chain } from "@/comman/constants";

const initPage = 0;
const initSize = 50;
const initSize = 20;

const ActivityContent = (): JSX.Element => {
const [size, setSize] = useState<number>(initSize);
Expand Down Expand Up @@ -71,16 +71,16 @@ const ActivityContent = (): JSX.Element => {
data={activities}
config={activitiesConfig}
isLoading={loading}
currentPage={0}
pageLimit={50}
currentPage={page}
pageLimit={size}
totalElements={activities?.totalElements}
pagesCount={activities?.totalPages}
typeView={TypeView.LIST}
isHiddenTopPagination
limitOptions={[
{ text: "10", value: 10 },
{ text: "20", value: 20 },
{ text: "50", value: 50 },
{ text: "100", value: 100 },
]}
sortBy={SORT_BY.RESERVATION_TIMESTAMP}
orderBy={ORDER_BY.DESC}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { addMinaText } from "@/helpers/name.helper";
import { useEffect, useState } from "react";

const initPage = 0;
const initSize = 50;
const initSize = 20;

const ActivityContent = ({
domainName,
Expand Down Expand Up @@ -55,23 +55,22 @@ const ActivityContent = ({
const onPage = (page) => {
setPage(page);
};
console.log(activities);

return (
<Table
data={activities}
config={activitiesConfig}
isLoading={loading}
currentPage={0}
pageLimit={50}
currentPage={page}
pageLimit={size}
totalElements={activities?.totalElements}
pagesCount={activities?.totalPages}
typeView={TypeView.LIST}
isHiddenTopPagination
limitOptions={[
{ text: "10", value: 10 },
{ text: "20", value: 20 },
{ text: "50", value: 50 },
{ text: "100", value: 100 },
]}
sortBy={SORT_BY.RESERVATION_TIMESTAMP}
orderBy={ORDER_BY.DESC}
Expand Down

0 comments on commit 7ee7b6d

Please sign in to comment.