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

Function useForumPostsQuery

desktop/src/features/forum/hooks.ts:20–30  ·  view source on GitHub ↗
(channel: Channel | null)

Source from the content-addressed store, hash-verified

18}
19
20export function useForumPostsQuery(channel: Channel | null) {
21 const channelId = channel?.id ?? "";
22
23 return useQuery<ForumPostsResponse>({
24 enabled: channel !== null && channel.channelType === "forum",
25 queryKey: forumPostsQueryKey(channelId),
26 queryFn: () => getForumPosts(channelId, 50),
27 staleTime: 15_000,
28 refetchInterval: 15_000,
29 });
30}
31
32export function useForumThreadQuery(
33 channelId: string | null,

Callers 1

ForumViewFunction · 0.90

Calls 2

getForumPostsFunction · 0.90
forumPostsQueryKeyFunction · 0.85

Tested by

no test coverage detected