()
| 30 | } |
| 31 | |
| 32 | export function useUpdateProfile() { |
| 33 | const queryClient = useQueryClient(); |
| 34 | |
| 35 | return useMutation({ |
| 36 | mutationFn: ({ profileId, data }: { profileId: string; data: VoiceProfileCreate }) => |
| 37 | apiClient.updateProfile(profileId, data), |
| 38 | onSuccess: (_, variables) => { |
| 39 | queryClient.invalidateQueries({ queryKey: ['profiles'] }); |
| 40 | queryClient.invalidateQueries({ |
| 41 | queryKey: ['profiles', variables.profileId], |
| 42 | }); |
| 43 | }, |
| 44 | }); |
| 45 | } |
| 46 | |
| 47 | export function useDeleteProfile() { |
| 48 | const queryClient = useQueryClient(); |
no test coverage detected