BB
Size: a a a
BB
🧨
🧨
BB
BB
🧨
BB
BB
BB
🧨
BB
BB
IS
IS
<div className={styles.property_container} ref={scrollContainerRef} onScroll={()=> {
if (scrollContainerRef.current.scrollTop + scrollContainerRef.current.clientHeight > scrollContainerRef.current.scrollHeight) {
console.log('move pager forward');
throttle(handlePageClick({selected: cur + 1}), 2000);
} else if (scrollContainerRef.current.scrollTop === 0 && cur > 0) {
console.log('move pager backward');
handlePageClick({selected: cur - 1});
}
}} >
{pagedListings.map((property) => (
<Property
key={property.id}
id={property.id}
price={property.original_price}
imgUrl={property.medium_photo_url}
address={property.address}
permalink={property.permalink}
bedRooms={property.total_bedrooms}
bathRooms={property.total_full_baths}
acre={property.acre}
handleClick={handleClick}
/>
))}
{!pagedListings.length && (
<h2 className={styles.no_result}>No Result</h2>
)}
</div>
<ReactPaginate
previousLabel={previousSVG}
nextLabel={nextSVG}
breakLabel="..."
breakClassName="break-me"
pageCount={pageCount}
marginPagesDisplayed={1}
pageRangeDisplayed={4}
containerClassName="pagination"
subContainerClassName="pages pagination"
activeClassName="active"
initialPage={0}
onPageChange={handlePageClick}
forcePage={cur}
/>IS
И
e
I
И
DT