mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
update catalog loadMore
This commit is contained in:
@@ -45,7 +45,9 @@ const Catalog = () => {
|
||||
const { subplebbitAddress } = useParams();
|
||||
const handleClickForm = useClickForm();
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
console.log(feed);
|
||||
}, [feed]);
|
||||
|
||||
useEffect(() => {
|
||||
setSelectedAddress(subplebbitAddress);
|
||||
@@ -330,11 +332,13 @@ const Catalog = () => {
|
||||
<hr />
|
||||
</TopBar>
|
||||
<Threads selectedStyle={selectedStyle}>
|
||||
{feed.length < 1 ? (
|
||||
<CatalogLoader />
|
||||
) : (
|
||||
<InfiniteScroll
|
||||
pageStart={0}
|
||||
loadMore={tryLoadMore}
|
||||
hasMore={hasMore}
|
||||
loader={<CatalogLoader key="loader" />}
|
||||
>
|
||||
{feed.map(thread => {
|
||||
const commentMediaInfo = getCommentMediaInfo(thread);
|
||||
@@ -390,6 +394,7 @@ const Catalog = () => {
|
||||
</div>
|
||||
)})}
|
||||
</InfiniteScroll>
|
||||
)}
|
||||
</Threads>
|
||||
</Container>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user