MCPcopy
hub / github.com/jamiepine/voicebox / useUpdateProfile

Function useUpdateProfile

app/src/lib/hooks/useProfiles.ts:32–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30}
31
32export 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
47export function useDeleteProfile() {
48 const queryClient = useQueryClient();

Callers 2

ProfileFormFunction · 0.90
VoiceInspectorFunction · 0.90

Calls 1

updateProfileMethod · 0.80

Tested by

no test coverage detected