refactor(bookmarks): clean up unused getIconForUrlType in CompactView and fix prop passing

This commit is contained in:
Gigi
2025-10-13 18:27:22 +02:00
parent b7896be507
commit 43d54b5734
3 changed files with 3 additions and 7 deletions

View File

@@ -110,7 +110,6 @@ export const BookmarkItem: React.FC<BookmarkItemProps> = ({ bookmark, index, onS
hasUrls,
extractedUrls,
onSelectUrl,
getIconForUrlType,
authorNpub,
eventNevent,
getAuthorDisplayName,
@@ -126,8 +125,8 @@ export const BookmarkItem: React.FC<BookmarkItemProps> = ({ bookmark, index, onS
if (viewMode === 'large') {
const previewImage = articleImage || instantPreview || ogImage
return <LargeView {...sharedProps} previewImage={previewImage} />
return <LargeView {...sharedProps} getIconForUrlType={getIconForUrlType} previewImage={previewImage} />
}
return <CardView {...sharedProps} articleImage={articleImage} />
return <CardView {...sharedProps} getIconForUrlType={getIconForUrlType} articleImage={articleImage} />
}

View File

@@ -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<CompactViewProps> = ({
hasUrls,
extractedUrls,
onSelectUrl,
getIconForUrlType,
articleSummary
}) => {
const isArticle = bookmark.kind === 30023

View File

@@ -116,7 +116,7 @@ export const LargeView: React.FC<LargeViewProps> = ({
</a>
)}
{/* CTA removed */
{/* CTA removed */}
</div>
</div>
</div>