From 4430d1780e42df1cbe155a7ca3464f1c0d9fd0b1 Mon Sep 17 00:00:00 2001 From: en Date: Mon, 3 Feb 2025 17:10:11 +0100 Subject: [PATCH] fix(profile): fetch parallel on visiting user profile --- src/components/ProfileSection.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/ProfileSection.tsx b/src/components/ProfileSection.tsx index 227a945..16e8b0d 100644 --- a/src/components/ProfileSection.tsx +++ b/src/components/ProfileSection.tsx @@ -26,7 +26,7 @@ import { import { LoadingSpinner } from './LoadingSpinner' import { ZapPopUp } from './Zap' import placeholder from '../assets/img/DEGMods Placeholder Img.png' -import { NDKEvent } from '@nostr-dev-kit/ndk' +import { NDKEvent, NDKSubscriptionCacheUsage } from '@nostr-dev-kit/ndk' import { useProfile } from 'hooks/useProfile' type Props = { @@ -93,7 +93,9 @@ type ProfileProps = { } export const Profile = ({ pubkey }: ProfileProps) => { - const profile = useProfile(pubkey) + const profile = useProfile(pubkey, { + cacheUsage: NDKSubscriptionCacheUsage.PARALLEL + }) const displayName = profile?.displayName || profile?.name || '[name not set up]'