From d21241165f04fcf53d89008a552f7f8b413041f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Mon, 30 Sep 2024 17:51:48 +0200 Subject: [PATCH] pl-fe: Remove unused code(?) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- .../src/features/account-gallery/index.tsx | 25 +++---------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/packages/pl-fe/src/features/account-gallery/index.tsx b/packages/pl-fe/src/features/account-gallery/index.tsx index 0139403aa..7de4eb42d 100644 --- a/packages/pl-fe/src/features/account-gallery/index.tsx +++ b/packages/pl-fe/src/features/account-gallery/index.tsx @@ -14,21 +14,6 @@ import { useModalsStore } from 'pl-fe/stores'; import MediaItem from './components/media-item'; -interface ILoadMoreMedia { - maxId: string | null; - onLoadMore: (value: string | null) => void; -} - -const LoadMoreMedia: React.FC = ({ maxId, onLoadMore }) => { - const handleLoadMore = () => { - onLoadMore(maxId); - }; - - return ( - - ); -}; - const AccountGallery = () => { const dispatch = useAppDispatch(); const { username } = useParams<{ username: string }>(); @@ -97,7 +82,7 @@ const AccountGallery = () => { let loadOlder = null; if (hasMore && !(isLoading && attachments.size === 0)) { - loadOlder = ; + loadOlder = ; } if (isUnavailable) { @@ -113,9 +98,7 @@ const AccountGallery = () => { return (
- {attachments.map((attachment, index) => attachment === null ? ( - 0 ? (attachments.get(index - 1)?.id || null) : null} onLoadMore={handleLoadMore} /> - ) : ( + {attachments.map((attachment, index) => ( {
)} - - {loadOlder} + {loadOlder} + {isLoading && attachments.size === 0 && (