(channel: Channel | null)
| 18 | } |
| 19 | |
| 20 | export 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 | |
| 32 | export function useForumThreadQuery( |
| 33 | channelId: string | null, |
no test coverage detected