diff --git a/src/components/BookmarkItem.tsx b/src/components/BookmarkItem.tsx index ad6cd9fe..e90baf8a 100644 --- a/src/components/BookmarkItem.tsx +++ b/src/components/BookmarkItem.tsx @@ -42,10 +42,11 @@ export const BookmarkItem: React.FC = ({ bookmark, index, onS const firstUrl = hasUrls ? extractedUrls[0] : null const firstUrlClassification = firstUrl ? classifyUrl(firstUrl) : null - // For kind:30023 articles, extract image and summary tags (per NIP-23) + // For kind:30023 articles, extract title, image and summary tags (per NIP-23) // Note: We extract directly from tags here since we don't have the full event. // When we have full events, we use getArticleImage() helper (see articleService.ts) const isArticle = bookmark.kind === 30023 + const articleTitle = isArticle ? bookmark.tags.find(t => t[0] === 'title')?.[1] : undefined const articleImage = isArticle ? bookmark.tags.find(t => t[0] === 'image')?.[1] : undefined const articleSummary = isArticle ? bookmark.tags.find(t => t[0] === 'summary')?.[1] : undefined @@ -156,10 +157,7 @@ export const BookmarkItem: React.FC = ({ bookmark, index, onS hasUrls, extractedUrls, onSelectUrl, - authorNpub, - getAuthorDisplayName, - handleReadNow, - articleSummary, + articleTitle, contentTypeIcon: getContentTypeIcon(), readingProgress } diff --git a/src/components/BookmarkViews/CompactView.tsx b/src/components/BookmarkViews/CompactView.tsx index fc3fdacd..a84e6311 100644 --- a/src/components/BookmarkViews/CompactView.tsx +++ b/src/components/BookmarkViews/CompactView.tsx @@ -13,7 +13,7 @@ interface CompactViewProps { hasUrls: boolean extractedUrls: string[] onSelectUrl?: (url: string, bookmark?: { id: string; kind: number; tags: string[][]; pubkey: string }) => void - articleSummary?: string + articleTitle?: string contentTypeIcon: IconDefinition readingProgress?: number } @@ -24,7 +24,7 @@ export const CompactView: React.FC = ({ hasUrls, extractedUrls, onSelectUrl, - articleSummary, + articleTitle, contentTypeIcon, readingProgress }) => { @@ -34,7 +34,7 @@ export const CompactView: React.FC = ({ const isNote = bookmark.kind === 1 const isClickable = hasUrls || isArticle || isWebBookmark || isNote - const displayText = isArticle && articleSummary ? articleSummary : bookmark.content + const displayText = isArticle && articleTitle ? articleTitle : bookmark.content // Calculate progress color let progressColor = '#6366f1' // Default blue (reading)