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 && (