From aebb6d176283a1fb5653fd23c126b9e7aaeb758c Mon Sep 17 00:00:00 2001 From: Gigi Date: Mon, 13 Oct 2025 17:21:59 +0200 Subject: [PATCH] refactor(bookmarks): remove READ/VIEW/WATCH CTA buttons and texts; simplify classifyUrl --- src/components/BookmarkItem.tsx | 1 - src/components/BookmarkViews/CardView.tsx | 13 +++---------- src/components/BookmarkViews/CompactView.tsx | 19 +------------------ src/components/BookmarkViews/LargeView.tsx | 9 +-------- 4 files changed, 5 insertions(+), 37 deletions(-) diff --git a/src/components/BookmarkItem.tsx b/src/components/BookmarkItem.tsx index 0c650297..1bf09017 100644 --- a/src/components/BookmarkItem.tsx +++ b/src/components/BookmarkItem.tsx @@ -111,7 +111,6 @@ export const BookmarkItem: React.FC = ({ bookmark, index, onS extractedUrls, onSelectUrl, getIconForUrlType, - firstUrlClassification, authorNpub, eventNevent, getAuthorDisplayName, diff --git a/src/components/BookmarkViews/CardView.tsx b/src/components/BookmarkViews/CardView.tsx index 336ac632..7abff35f 100644 --- a/src/components/BookmarkViews/CardView.tsx +++ b/src/components/BookmarkViews/CardView.tsx @@ -19,7 +19,6 @@ interface CardViewProps { extractedUrls: string[] onSelectUrl?: (url: string, bookmark?: { id: string; kind: number; tags: string[][]; pubkey: string }) => void getIconForUrlType: IconGetter - firstUrlClassification: { buttonText: string } | null authorNpub: string eventNevent?: string getAuthorDisplayName: () => string @@ -36,7 +35,6 @@ export const CardView: React.FC = ({ extractedUrls, onSelectUrl, getIconForUrlType, - firstUrlClassification, authorNpub, eventNevent, getAuthorDisplayName, @@ -113,7 +111,6 @@ export const CardView: React.FC = ({ {extractedUrls.length > 0 && (
{(urlsExpanded ? extractedUrls : extractedUrls.slice(0, 1)).map((url, urlIndex) => { - const classification = classifyUrl(url) return (
{ e.preventDefault(); onSelectUrl?.(url) }} @@ -186,11 +183,7 @@ export const CardView: React.FC = ({ {getAuthorDisplayName()}
- {(hasUrls && firstUrlClassification) || bookmark.kind === 30023 ? ( - - ) : null} + {/* CTA removed */}
) diff --git a/src/components/BookmarkViews/CompactView.tsx b/src/components/BookmarkViews/CompactView.tsx index 9adf69e1..e4cb8749 100644 --- a/src/components/BookmarkViews/CompactView.tsx +++ b/src/components/BookmarkViews/CompactView.tsx @@ -13,7 +13,6 @@ interface CompactViewProps { extractedUrls: string[] onSelectUrl?: (url: string, bookmark?: { id: string; kind: number; tags: string[][]; pubkey: string }) => void getIconForUrlType: IconGetter - firstUrlClassification: { buttonText: string } | null articleImage?: string articleSummary?: string } @@ -25,7 +24,6 @@ export const CompactView: React.FC = ({ extractedUrls, onSelectUrl, getIconForUrlType, - firstUrlClassification, articleSummary }) => { const isArticle = bookmark.kind === 30023 @@ -76,22 +74,7 @@ export const CompactView: React.FC = ({ )} {formatDateCompact(bookmark.created_at)} - {isClickable && ( - - )} + {/* CTA removed */} ) diff --git a/src/components/BookmarkViews/LargeView.tsx b/src/components/BookmarkViews/LargeView.tsx index 24a78d69..1e1faf4e 100644 --- a/src/components/BookmarkViews/LargeView.tsx +++ b/src/components/BookmarkViews/LargeView.tsx @@ -15,7 +15,6 @@ interface LargeViewProps { extractedUrls: string[] onSelectUrl?: (url: string, bookmark?: { id: string; kind: number; tags: string[][]; pubkey: string }) => void getIconForUrlType: IconGetter - firstUrlClassification: { buttonText: string } | null previewImage: string | null authorNpub: string eventNevent?: string @@ -32,7 +31,6 @@ export const LargeView: React.FC = ({ extractedUrls, onSelectUrl, getIconForUrlType, - firstUrlClassification, previewImage, authorNpub, eventNevent, @@ -100,12 +98,7 @@ export const LargeView: React.FC = ({ )} - {(hasUrls && firstUrlClassification) || isArticle ? ( - - ) : null} + {/* CTA removed */}