MCPcopy Create free account
hub / github.com/block/buzz / useUserProfileQuery

Function useUserProfileQuery

desktop/src/features/profile/hooks.ts:263–270  ·  view source on GitHub ↗
(pubkey?: string)

Source from the content-addressed store, hash-verified

261}
262
263export function useUserProfileQuery(pubkey?: string) {
264 return useQuery({
265 enabled: typeof pubkey === "string" && pubkey.length > 0,
266 queryKey: ["user-profile", pubkey?.toLowerCase() ?? ""],
267 queryFn: () => getUserProfile(pubkey),
268 staleTime: 60_000,
269 });
270}
271
272// Per-pubkey resolution cache backing `useUsersBatchQuery`'s delta fetch.
273// `summary: null` records a relay-confirmed miss so unknown pubkeys aren't

Callers 5

UserProfilePanelFunction · 0.90
UserProfilePopoverFunction · 0.90
ReplyParentContextFunction · 0.90
AgentPersonaCardFunction · 0.90
StandaloneAgentCardFunction · 0.90

Calls 1

getUserProfileFunction · 0.90

Tested by

no test coverage detected