From ff6ebb349ef052e2a6a3374b988bb61ac487b303 Mon Sep 17 00:00:00 2001 From: zmeyer44 Date: Tue, 7 May 2024 20:46:50 -0400 Subject: [PATCH] crash fix --- components/ProfileContainers/AvatarStack.tsx | 4 ++-- lib/hooks/useProfile.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/ProfileContainers/AvatarStack.tsx b/components/ProfileContainers/AvatarStack.tsx index 8cc254d..541ffc7 100644 --- a/components/ProfileContainers/AvatarStack.tsx +++ b/components/ProfileContainers/AvatarStack.tsx @@ -44,8 +44,8 @@ export default function AvatarStack({ } function User({ pubkey, className }: { pubkey: string; className: string }) { - const { profile } = useProfile(pubkey); - const npub = nip19.npubEncode(pubkey); + const { profile, npub } = useProfile(pubkey); + // const npub = profilenip19.npubEncode(pubkey); return ( { if (!ndk) return; if (NOSTR_BECH32_REGEXP.test(key)) { @@ -20,5 +20,5 @@ export default function useProfile(key: string) { }; }, [key, ndk]); - return { profile: getProfile(key) }; + return { profile: getProfile(key), npub: npub }; }