diff --git a/packages/app/src/Element/NostrLink.tsx b/packages/app/src/Element/NostrLink.tsx index cdb8151c..693f25ce 100644 --- a/packages/app/src/Element/NostrLink.tsx +++ b/packages/app/src/Element/NostrLink.tsx @@ -9,11 +9,11 @@ export default function NostrLink({ link }: { link: string }) { if (nav?.type === NostrPrefix.PublicKey || nav?.type === NostrPrefix.Profile) { return ; - } else if (nav?.type === NostrPrefix.Note || nav?.type === NostrPrefix.Event) { - const evLink = eventLink(nav.id, nav.relays); + } else if (nav?.type === NostrPrefix.Note || nav?.type === NostrPrefix.Event || nav?.type === NostrPrefix.Address) { + const evLink = nav.encode(); return ( - e.stopPropagation()} state={{ from: location.pathname }}> - #{evLink.split("/").at(-1)?.substring(0, 12)} + e.stopPropagation()} state={{ from: location.pathname }}> + #{evLink.substring(0, 12)} ); } else {