Fix GRPC with files not refreshing, and tight render loop

This commit is contained in:
Gregory Schier
2024-06-20 08:40:10 -07:00
parent 92b1582232
commit 88aeb0e530
62 changed files with 221 additions and 163 deletions

View File

@@ -1,5 +1,5 @@
import { useMutation } from '@tanstack/react-query';
import { invoke } from '@tauri-apps/api/core';
import { invokeCmd } from '../lib/tauri';
import { useAppRoutes } from './useAppRoutes';
import { getRecentEnvironments } from './useRecentEnvironments';
import { getRecentRequests } from './useRecentRequests';
@@ -26,7 +26,7 @@ export function useOpenWorkspace() {
requestId,
})
: routes.paths.workspace({ workspaceId, environmentId });
await invoke('cmd_new_window', { url: path });
await invokeCmd('cmd_new_window', { url: path });
} else {
const environmentId = (await getRecentEnvironments(workspaceId))[0];
const requestId = (await getRecentRequests(workspaceId))[0];