From 43d54b5734f55ec645b477c70655a1828dc5ee30 Mon Sep 17 00:00:00 2001 From: Gigi Date: Mon, 13 Oct 2025 18:27:22 +0200 Subject: [PATCH] refactor(bookmarks): clean up unused getIconForUrlType in CompactView and fix prop passing --- src/components/BookmarkItem.tsx | 5 ++--- src/components/BookmarkViews/CompactView.tsx | 3 --- src/components/BookmarkViews/LargeView.tsx | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/components/BookmarkItem.tsx b/src/components/BookmarkItem.tsx index 1bf09017..0345bc37 100644 --- a/src/components/BookmarkItem.tsx +++ b/src/components/BookmarkItem.tsx @@ -110,7 +110,6 @@ export const BookmarkItem: React.FC = ({ bookmark, index, onS hasUrls, extractedUrls, onSelectUrl, - getIconForUrlType, authorNpub, eventNevent, getAuthorDisplayName, @@ -126,8 +125,8 @@ export const BookmarkItem: React.FC = ({ bookmark, index, onS if (viewMode === 'large') { const previewImage = articleImage || instantPreview || ogImage - return + return } - return + return } diff --git a/src/components/BookmarkViews/CompactView.tsx b/src/components/BookmarkViews/CompactView.tsx index e4cb8749..a49a0bd6 100644 --- a/src/components/BookmarkViews/CompactView.tsx +++ b/src/components/BookmarkViews/CompactView.tsx @@ -4,7 +4,6 @@ import { faBookmark, faUserLock, faGlobe } from '@fortawesome/free-solid-svg-ico import { IndividualBookmark } from '../../types/bookmarks' import { formatDateCompact } from '../../utils/bookmarkUtils' import ContentWithResolvedProfiles from '../ContentWithResolvedProfiles' -import { IconGetter } from './shared' interface CompactViewProps { bookmark: IndividualBookmark @@ -12,7 +11,6 @@ interface CompactViewProps { hasUrls: boolean extractedUrls: string[] onSelectUrl?: (url: string, bookmark?: { id: string; kind: number; tags: string[][]; pubkey: string }) => void - getIconForUrlType: IconGetter articleImage?: string articleSummary?: string } @@ -23,7 +21,6 @@ export const CompactView: React.FC = ({ hasUrls, extractedUrls, onSelectUrl, - getIconForUrlType, articleSummary }) => { const isArticle = bookmark.kind === 30023 diff --git a/src/components/BookmarkViews/LargeView.tsx b/src/components/BookmarkViews/LargeView.tsx index 92e5850d..45d84252 100644 --- a/src/components/BookmarkViews/LargeView.tsx +++ b/src/components/BookmarkViews/LargeView.tsx @@ -116,7 +116,7 @@ export const LargeView: React.FC = ({ )} - {/* CTA removed */ + {/* CTA removed */}