Remove remaining genUserName references from docs and skill templates

This commit is contained in:
Alex Gleason committed 2026-05-30 18:44:53 +02:00
1 parent 881629a746
commit 2b7d6655af
5 files changed
+8 -13

No files matched your search

@@ -3,7 +3,6 @@ import { type NostrEvent } from '@nostrify/nostrify';
import { Link } from 'react-router-dom';
import { nip19 } from 'nostr-tools';
import { useAuthor } from '@/hooks/useAuthor';
import { genUserName } from '@/lib/genUserName';
import { getDisplayName } from '@/lib/getDisplayName';
import { getAvatarShape } from '@/lib/avatarShape';
import { useProfileUrl } from '@/hooks/useProfileUrl';
@@ -532,7 +531,7 @@ export function NoteContent({
const author = useAuthor(hasMedia ? event.pubkey : undefined);
const authorMetadata = author.data?.metadata;
const authorDisplayName = useMemo(
() => getDisplayName(authorMetadata, event.pubkey) ?? genUserName(event.pubkey),
() => getDisplayName(authorMetadata, event.pubkey),
[authorMetadata, event.pubkey],
);
@@ -843,7 +842,7 @@ function InlineImage({ url, onClick }: { url: string; onClick: (e: React.MouseEv
function NostrMention({ pubkey }: { pubkey: string }) {
const author = useAuthor(pubkey);
const hasRealName = !!author.data?.metadata?.name;
const displayName = author.data?.metadata?.name ?? genUserName(pubkey);
const displayName = author.data?.metadata?.name ?? 'Anonymous';
const profileUrl = useProfileUrl(pubkey, author.data?.metadata);
return (