import React from 'react' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faBookmark, faUserLock, faGlobe } from '@fortawesome/free-solid-svg-icons' import { IndividualBookmark } from '../../types/bookmarks' import { formatDateCompact } from '../../utils/bookmarkUtils' import ContentWithResolvedProfiles from '../ContentWithResolvedProfiles' interface CompactViewProps { bookmark: IndividualBookmark index: number hasUrls: boolean extractedUrls: string[] onSelectUrl?: (url: string, bookmark?: { id: string; kind: number; tags: string[][]; pubkey: string }) => void articleImage?: string articleSummary?: string } export const CompactView: React.FC = ({ bookmark, index, hasUrls, extractedUrls, onSelectUrl, articleSummary }) => { const isArticle = bookmark.kind === 30023 const isWebBookmark = bookmark.kind === 39701 const isClickable = hasUrls || isArticle || isWebBookmark const handleCompactClick = () => { if (!onSelectUrl) return if (isArticle) { onSelectUrl('', { id: bookmark.id, kind: bookmark.kind, tags: bookmark.tags, pubkey: bookmark.pubkey }) } else if (hasUrls) { onSelectUrl(extractedUrls[0]) } } // For articles, prefer summary; for others, use content const displayText = isArticle && articleSummary ? articleSummary : bookmark.content return (
{isWebBookmark ? ( ) : bookmark.isPrivate ? ( <> ) : ( )} {displayText && (
60 ? '…' : '')} />
)} {formatDateCompact(bookmark.created_at)} {/* CTA removed */}
) }