diff --git a/packages/app/src/Element/NostrLink.tsx b/packages/app/src/Element/NostrLink.tsx
index 69d0499..cdb8151 100644
--- a/packages/app/src/Element/NostrLink.tsx
+++ b/packages/app/src/Element/NostrLink.tsx
@@ -1,8 +1,8 @@
-import { encodeTLV, NostrPrefix } from "@snort/nostr";
+import { NostrPrefix } from "@snort/nostr";
import { Link } from "react-router-dom";
import Mention from "Element/Mention";
-import { parseNostrLink } from "Util";
+import { eventLink, parseNostrLink } from "Util";
export default function NostrLink({ link }: { link: string }) {
const nav = parseNostrLink(link);
@@ -10,11 +10,10 @@ 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) {
- // translate all "event" links to nevent
- const evLink = encodeTLV(nav.id, NostrPrefix.Event, nav.relays);
+ const evLink = eventLink(nav.id, nav.relays);
return (
- e.stopPropagation()} state={{ from: location.pathname }}>
- #{evLink.substring(0, 12)}
+ e.stopPropagation()} state={{ from: location.pathname }}>
+ #{evLink.split("/").at(-1)?.substring(0, 12)}
);
} else {