( projectId: string, opts?: UseQueryOptionsOverride<ListConversationsResponse>, )
| 85 | }; |
| 86 | |
| 87 | export const useListConversationsQuery = ( |
| 88 | projectId: string, |
| 89 | opts?: UseQueryOptionsOverride<ListConversationsResponse>, |
| 90 | ) => { |
| 91 | // Only fetch if logged in |
| 92 | const { user } = useAuthStore(); |
| 93 | return useQuery({ |
| 94 | queryKey: queryKeys.conversations.listConversations(projectId).queryKey, |
| 95 | queryFn: () => listConversations({ projectId }), |
| 96 | enabled: !!user, |
| 97 | ...opts, |
| 98 | }); |
| 99 | }; |
| 100 | |
| 101 | export const useDeleteConversationMutation = (opts?: UseMutationOptionsOverride<DeleteConversationResponse>) => { |
| 102 | return useMutation({ |
no test coverage detected