Fix stale profile data #214

Merged
enes merged 6 commits from issues/208-profile-box-cache into staging 2025-02-03 16:43:49 +00:00
Showing only changes of commit 4430d1780e - Show all commits

View File

@ -26,7 +26,7 @@ import {
import { LoadingSpinner } from './LoadingSpinner' import { LoadingSpinner } from './LoadingSpinner'
import { ZapPopUp } from './Zap' import { ZapPopUp } from './Zap'
import placeholder from '../assets/img/DEGMods Placeholder Img.png' 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' import { useProfile } from 'hooks/useProfile'
type Props = { type Props = {
@ -93,7 +93,9 @@ type ProfileProps = {
} }
export const Profile = ({ pubkey }: ProfileProps) => { export const Profile = ({ pubkey }: ProfileProps) => {
const profile = useProfile(pubkey) const profile = useProfile(pubkey, {
cacheUsage: NDKSubscriptionCacheUsage.PARALLEL
})
const displayName = const displayName =
profile?.displayName || profile?.name || '[name not set up]' profile?.displayName || profile?.name || '[name not set up]'