diff --git a/web/components/contract/contracts-list.tsx b/web/components/contract/contracts-list.tsx index 1850cf0b..d6bef2e7 100644 --- a/web/components/contract/contracts-list.tsx +++ b/web/components/contract/contracts-list.tsx @@ -25,15 +25,16 @@ export function ContractsGrid(props: { showCloseTime?: boolean }) { const { showCloseTime } = props + const PAGE_SIZE = 100 + const [page, setPage] = useState(1) const [resolvedContracts, activeContracts] = _.partition( props.contracts, (c) => c.isResolved ) - const contracts = [...activeContracts, ...resolvedContracts].slice( - 0, - MAX_CONTRACTS_DISPLAYED - ) + const allContracts = [...activeContracts, ...resolvedContracts] + const showMore = allContracts.length > PAGE_SIZE * page + const contracts = allContracts.slice(0, PAGE_SIZE * page) if (contracts.length === 0) { return ( @@ -47,16 +48,27 @@ export function ContractsGrid(props: { } return ( -