mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-27 20:01:25 +01:00
Fix graphql and other things
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
||||
import { invoke } from '@tauri-apps/api';
|
||||
import type { HttpResponse } from '../lib/models';
|
||||
import { responsesQueryKey } from './useResponses';
|
||||
|
||||
export function useDeleteResponse(response: HttpResponse | null) {
|
||||
const queryClient = useQueryClient();
|
||||
@@ -12,7 +13,7 @@ export function useDeleteResponse(response: HttpResponse | null) {
|
||||
onSuccess: () => {
|
||||
if (response === null) return;
|
||||
queryClient.setQueryData(
|
||||
['responses', { requestId: response.requestId }],
|
||||
responsesQueryKey(response.requestId),
|
||||
(responses: HttpResponse[] = []) => responses.filter((r) => r.id !== response.id),
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user