style(highlights): show only external-link icon for source (no label)

This commit is contained in:
Gigi
2025-10-05 21:57:57 +01:00
parent 7425121746
commit 6088dcc395

View File

@@ -1,6 +1,6 @@
import React, { useEffect, useRef } from 'react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faQuoteLeft, faLink, faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons'
import { faQuoteLeft, faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons'
import { Highlight } from '../types/highlights'
import { formatDistanceToNow } from 'date-fns'
@@ -88,10 +88,9 @@ export const HighlightItem: React.FC<HighlightItemProps> = ({ highlight, onSelec
rel="noopener noreferrer"
onClick={(e) => highlight.urlReference && onSelectUrl ? handleLinkClick(highlight.urlReference, e) : undefined}
className="highlight-source"
title={highlight.eventReference ? 'View on Nostr' : 'View source'}
title={highlight.eventReference ? 'Open on Nostr' : 'Open source'}
>
<FontAwesomeIcon icon={highlight.eventReference ? faLink : faExternalLinkAlt} />
<span>{highlight.eventReference ? 'Nostr event' : 'Source'}</span>
<FontAwesomeIcon icon={faExternalLinkAlt} />
</a>
)}
</div>