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

Function useForumThreadQuery

desktop/src/features/forum/hooks.ts:32–43  ·  view source on GitHub ↗
(
  channelId: string | null,
  eventId: string | null,
)

Source from the content-addressed store, hash-verified

30}
31
32export function useForumThreadQuery(
33 channelId: string | null,
34 eventId: string | null,
35) {
36 return useQuery<ForumThreadResponse>({
37 enabled: channelId !== null && eventId !== null,
38 queryKey: forumThreadQueryKey(channelId ?? "", eventId ?? ""),
39 queryFn: () => getForumThread(channelId ?? "", eventId ?? ""),
40 staleTime: 10_000,
41 refetchInterval: 10_000,
42 });
43}
44
45export function useCreateForumPostMutation(channel: Channel | null) {
46 const queryClient = useQueryClient();

Callers 1

ForumViewFunction · 0.90

Calls 2

getForumThreadFunction · 0.90
forumThreadQueryKeyFunction · 0.85

Tested by

no test coverage detected