mirror of
https://gitlab.com/soapbox-pub/mkstack.git
synced 2026-12-06 00:37:23 +00:00
Fix URL wrapping in NoteContent
This commit is contained in:
1 file changed
+7
-2
@@ -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>
|
||||||
|
|||||||
Reference in new issue
Block a user