From ec4e6f2712cfc4d7381d0693bf80434e8c9d1230 Mon Sep 17 00:00:00 2001 From: highperfocused Date: Sun, 4 May 2025 23:11:50 +0200 Subject: [PATCH] update profile data fetching method in TrendingImageNew component --- components/TrendingImageNew.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/TrendingImageNew.tsx b/components/TrendingImageNew.tsx index e515a3b..e91f545 100644 --- a/components/TrendingImageNew.tsx +++ b/components/TrendingImageNew.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import { useProfile } from "nostr-react"; import { nip19 } from "nostr-tools"; import { Card, @@ -10,6 +9,7 @@ import { import Link from 'next/link'; import { Avatar } from './ui/avatar'; import { AvatarImage } from '@radix-ui/react-avatar'; +import { useProfile, useProfileValue } from '@nostr-dev-kit/ndk-hooks'; interface TrendingImageNewProps { event: { @@ -22,9 +22,7 @@ interface TrendingImageNewProps { } const TrendingImageNew: React.FC = ({ event }) => { - const { data: userData } = useProfile({ - pubkey: event.pubkey, - }); + const userData = useProfileValue(event.pubkey); const npubShortened = (() => { let encoded = nip19.npubEncode(event.pubkey);