fix: random exception on mentions

This commit is contained in:
2023-11-17 21:50:12 +00:00
parent eba47f085d
commit 9721aa506a
4 changed files with 18 additions and 17 deletions

View File

@ -14,7 +14,7 @@ export default function Mention({ link }: { link: NostrLink }) {
return (
<>
<ProfileLink pubkey={link.id} user={profile} onClick={e => e.stopPropagation()}>
<ProfileLink pubkey={link.id} link={link} user={profile} onClick={e => e.stopPropagation()}>
<span ref={ref}>
@<DisplayName user={profile} pubkey={link.id} />
</span>

View File

@ -8,6 +8,10 @@ export default function NostrLink({ link, depth }: { link: string; depth?: numbe
const nav = tryParseNostrLink(link);
if (nav?.type === NostrPrefix.PublicKey || nav?.type === NostrPrefix.Profile) {
if(nav.id.startsWith("npub")){
// eslint-disable-next-line no-debugger
debugger;
}
return <Mention link={nav} />;
} else if (nav?.type === NostrPrefix.Note || nav?.type === NostrPrefix.Event || nav?.type === NostrPrefix.Address) {
if ((depth ?? 0) > 0) {