Fix URL wrapping in NoteContent

This commit is contained in:
Alex Gleason committed 2025-12-30 18:19:20 -06:00
1 parent 816051f5ea
commit e26ab6a433
1 file changed
+7 -2
+7 -2
View File
@@ -45,7 +45,7 @@ export function NoteContent({
href={url} href={url}
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
className="text-blue-500 hover:underline" className="text-blue-500 hover:underline break-all"
> >
{url} {url}
</a> </a>
@@ -61,13 +61,18 @@ export function NoteContent({
parts.push( parts.push(
<NostrMention key={`mention-${keyCounter++}`} pubkey={pubkey} /> <NostrMention key={`mention-${keyCounter++}`} pubkey={pubkey} />
); );
} else if (decoded.type === 'nprofile') {
const pubkey = decoded.data.pubkey;
parts.push(
<NostrMention key={`mention-${keyCounter++}`} pubkey={pubkey} />
);
} else { } else {
// For other types, just show as a link // For other types, just show as a link
parts.push( parts.push(
<Link <Link
key={`nostr-${keyCounter++}`} key={`nostr-${keyCounter++}`}
to={`/${nostrId}`} to={`/${nostrId}`}
className="text-blue-500 hover:underline" className="text-blue-500 hover:underline break-all"
> >
{fullMatch} {fullMatch}
</Link> </Link>