mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-23 17:18:32 +02:00
Refactor desktop app into separate client and proxy apps
This commit is contained in:
12
apps/yaak-client/hooks/useDeleteGrpcConnections.ts
Normal file
12
apps/yaak-client/hooks/useDeleteGrpcConnections.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { invokeCmd } from '../lib/tauri';
|
||||
import { useFastMutation } from './useFastMutation';
|
||||
|
||||
export function useDeleteGrpcConnections(requestId?: string) {
|
||||
return useFastMutation({
|
||||
mutationKey: ['delete_grpc_connections', requestId],
|
||||
mutationFn: async () => {
|
||||
if (requestId === undefined) return;
|
||||
await invokeCmd('cmd_delete_all_grpc_connections', { requestId });
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user