mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-23 18:01:21 +01:00
Typesafe routing and CM line height issue
This commit is contained in:
11
src-web/hooks/useDeleteResponse.ts
Normal file
11
src-web/hooks/useDeleteResponse.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
import { invoke } from '@tauri-apps/api';
|
||||
|
||||
export function useDeleteResponse(id: string | null) {
|
||||
return useMutation({
|
||||
mutationFn: async () => {
|
||||
if (id === null) return;
|
||||
await invoke('delete_response', { id: id });
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user