From 67ac2b662bfdb8077a0f7be1867d62f323e0357d Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Thu, 30 May 2024 18:11:48 +0200 Subject: [PATCH] Update catalog.tsx --- src/views/catalog/catalog.tsx | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/views/catalog/catalog.tsx b/src/views/catalog/catalog.tsx index 14a6a3a7..8ac7f516 100644 --- a/src/views/catalog/catalog.tsx +++ b/src/views/catalog/catalog.tsx @@ -63,7 +63,6 @@ const useFeedRows = (columnCount: number, feed: any, isFeedLoaded: boolean, subp return _feed; }, [feed, description, rules, address, isFeedLoaded, createdAt, title, shortAddress, avatarUrl, t, isInAllView, multisub, includeDescriptionAndRules]); - // Memoize rows calculation, ensuring it updates on changes to the modified feed or column count const rows = useMemo(() => { const rows = []; for (let i = 0; i < feedWithDescriptionAndRules.length; i += columnCount) { @@ -178,18 +177,22 @@ const Catalog = () => { {location.pathname.endsWith('/settings') && }
- } - useWindowScroll={true} - components={{ Footer }} - endReached={loadMore} - ref={virtuosoRef} - restoreStateFrom={lastVirtuosoState} - initialScrollTop={lastVirtuosoState?.scrollTop} - /> + {showBlockedComments ? ( + rows.map((row, index) => ) + ) : ( + } + useWindowScroll={true} + components={{ Footer }} + endReached={loadMore} + ref={virtuosoRef} + restoreStateFrom={lastVirtuosoState} + initialScrollTop={lastVirtuosoState?.scrollTop} + /> + )}
);