mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-28 04:11:16 +01:00
Fix GRPC with files not refreshing, and tight render loop
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
import type { HttpResponse } from '../lib/models';
|
||||
import { invokeCmd } from '../lib/tauri';
|
||||
|
||||
export function httpResponsesQueryKey({ requestId }: { requestId: string }) {
|
||||
return ['http_responses', { requestId }];
|
||||
@@ -13,7 +13,7 @@ export function useHttpResponses(requestId: string | null) {
|
||||
initialData: [],
|
||||
queryKey: httpResponsesQueryKey({ requestId: requestId ?? 'n/a' }),
|
||||
queryFn: async () => {
|
||||
return (await invoke('cmd_list_http_responses', {
|
||||
return (await invokeCmd('cmd_list_http_responses', {
|
||||
requestId,
|
||||
limit: 200,
|
||||
})) as HttpResponse[];
|
||||
|
||||
Reference in New Issue
Block a user