diff --git a/src/components/BookmarkItem.tsx b/src/components/BookmarkItem.tsx index 6e6d0532..fbeb8e3d 100644 --- a/src/components/BookmarkItem.tsx +++ b/src/components/BookmarkItem.tsx @@ -3,6 +3,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faLock, faGlobe, faCopy } from '@fortawesome/free-solid-svg-icons' import { IndividualBookmark } from '../types/bookmarks' import { formatDate, renderParsedContent } from '../utils/bookmarkUtils' +import { extractUrlsFromContent } from '../services/bookmarkHelpers' interface BookmarkItemProps { bookmark: IndividualBookmark @@ -19,6 +20,9 @@ export const BookmarkItem: React.FC = ({ bookmark, index }) = } const short = (v: string) => `${v.slice(0, 8)}...${v.slice(-8)}` + + // Extract URLs from bookmark content + const extractedUrls = extractUrlsFromContent(bookmark.content) return (
@@ -35,6 +39,17 @@ export const BookmarkItem: React.FC = ({ bookmark, index }) = {formatDate(bookmark.created_at)}
+ {extractedUrls.length > 0 && ( +
+

URLs:

+ {extractedUrls.map((url, urlIndex) => ( + + {url} + + ))} +
+ )} + {bookmark.parsedContent ? (
{renderParsedContent(bookmark.parsedContent)}