bug: render naddr link
This commit is contained in:
parent
cc4cda64f4
commit
5736bad21f
@ -9,11 +9,11 @@ export default function NostrLink({ link }: { link: string }) {
|
||||
|
||||
if (nav?.type === NostrPrefix.PublicKey || nav?.type === NostrPrefix.Profile) {
|
||||
return <Mention pubkey={nav.id} relays={nav.relays} />;
|
||||
} 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 (
|
||||
<Link to={evLink} onClick={e => e.stopPropagation()} state={{ from: location.pathname }}>
|
||||
#{evLink.split("/").at(-1)?.substring(0, 12)}
|
||||
<Link to={`/e/${evLink}`} onClick={e => e.stopPropagation()} state={{ from: location.pathname }}>
|
||||
#{evLink.substring(0, 12)}
|
||||
</Link>
|
||||
);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user