diff --git a/src/components/EditProfileForm.tsx b/src/components/EditProfileForm.tsx index 1219ae9..a8e3a46 100644 --- a/src/components/EditProfileForm.tsx +++ b/src/components/EditProfileForm.tsx @@ -108,7 +108,7 @@ export const EditProfileForm: React.FC = () => { // Invalidate queries to refresh the data queryClient.invalidateQueries({ queryKey: ['logins'] }); - queryClient.invalidateQueries({ queryKey: ['author', user.pubkey] }); + queryClient.invalidateQueries({ queryKey: ['nostr', 'author', user.pubkey] }); toast({ title: 'Success', diff --git a/src/hooks/useAuthor.ts b/src/hooks/useAuthor.ts index 271d4c2..51b7e80 100644 --- a/src/hooks/useAuthor.ts +++ b/src/hooks/useAuthor.ts @@ -6,7 +6,7 @@ export function useAuthor(pubkey: string | undefined) { const { nostr } = useNostr(); return useQuery<{ event?: NostrEvent; metadata?: NostrMetadata }>({ - queryKey: ['author', pubkey ?? ''], + queryKey: ['nostr', 'author', pubkey ?? ''], queryFn: async ({ signal }) => { if (!pubkey) { return {}; diff --git a/src/hooks/useZaps.ts b/src/hooks/useZaps.ts index ec16d45..2fbfae5 100644 --- a/src/hooks/useZaps.ts +++ b/src/hooks/useZaps.ts @@ -41,7 +41,7 @@ export function useZaps( }, []); const { data: zapEvents, ...query } = useQuery({ - queryKey: ['zaps', actualTarget?.id], + queryKey: ['nostr', 'zaps', actualTarget?.id], staleTime: 30000, // 30 seconds refetchInterval: (query) => { // Only refetch if the query is currently being observed (component is mounted) @@ -246,7 +246,7 @@ export function useZaps( }); // Invalidate zap queries to refresh counts - queryClient.invalidateQueries({ queryKey: ['zaps'] }); + queryClient.invalidateQueries({ queryKey: ['nostr', 'zaps'] }); // Close dialog last to ensure clean state onZapSuccess?.(); @@ -290,7 +290,7 @@ export function useZaps( }); // Invalidate zap queries to refresh counts - queryClient.invalidateQueries({ queryKey: ['zaps'] }); + queryClient.invalidateQueries({ queryKey: ['nostr', 'zaps'] }); // Close dialog last to ensure clean state onZapSuccess?.();