mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-10 11:13:48 +02: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 { GrpcEvent } from '../lib/models';
|
||||
import { invokeCmd } from '../lib/tauri';
|
||||
|
||||
export function grpcEventsQueryKey({ connectionId }: { connectionId: string }) {
|
||||
return ['grpc_events', { connectionId }];
|
||||
@@ -13,7 +13,7 @@ export function useGrpcEvents(connectionId: string | null) {
|
||||
initialData: [],
|
||||
queryKey: grpcEventsQueryKey({ connectionId: connectionId ?? 'n/a' }),
|
||||
queryFn: async () => {
|
||||
return (await invoke('cmd_list_grpc_events', {
|
||||
return (await invokeCmd('cmd_list_grpc_events', {
|
||||
connectionId,
|
||||
limit: 200,
|
||||
})) as GrpcEvent[];
|
||||
|
||||
Reference in New Issue
Block a user