diff --git a/packages/app/src/Element/Text.tsx b/packages/app/src/Element/Text.tsx index a4274ba3..f3c0d856 100644 --- a/packages/app/src/Element/Text.tsx +++ b/packages/app/src/Element/Text.tsx @@ -25,9 +25,10 @@ export interface TextProps { content: string; creator: HexKey; tags: Array>; + disableMedia?: boolean; } -export default function Text({ content, tags, creator }: TextProps) { +export default function Text({ content, tags, creator, disableMedia }: TextProps) { const location = useLocation(); function extractLinks(fragments: Fragment[]) { @@ -36,6 +37,13 @@ export default function Text({ content, tags, creator }: TextProps) { if (typeof f === "string") { return splitByUrl(f).map(a => { if (a.match(/^(?:https?|(?:web\+)?nostr):/i)) { + if (disableMedia ?? false) { + return ( + e.stopPropagation()} target="_blank" rel="noreferrer" className="ext"> + {a} + + ); + } return ; } return a; diff --git a/packages/app/src/Pages/ProfilePage.tsx b/packages/app/src/Pages/ProfilePage.tsx index bb1d2e60..4c9500bf 100644 --- a/packages/app/src/Pages/ProfilePage.tsx +++ b/packages/app/src/Pages/ProfilePage.tsx @@ -107,6 +107,7 @@ export default function ProfilePage() { content: aboutText, tags: [], creator: "", + disableMedia: true, }); const npub = !id?.startsWith(NostrPrefix.PublicKey) ? hexToBech32(NostrPrefix.PublicKey, id || undefined) : id;