From 5736bad21f1bf06c2ba6403b5d43a1be8ce2f6eb Mon Sep 17 00:00:00 2001 From: Kieran Date: Sat, 15 Apr 2023 00:27:19 +0100 Subject: [PATCH] bug: render naddr link --- packages/app/src/Element/NostrLink.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 {