mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-24 10:21:15 +01:00
Some fixes after upgrading react-query
This commit is contained in:
@@ -9,8 +9,12 @@ export function workspacesQueryKey(_?: {}) {
|
||||
|
||||
export function useWorkspaces() {
|
||||
return (
|
||||
useQuery(workspacesQueryKey(), async () => {
|
||||
return (await invoke('cmd_list_workspaces')) as Workspace[];
|
||||
useQuery({
|
||||
queryKey: workspacesQueryKey(),
|
||||
queryFn: async () => {
|
||||
const workspaces = await invoke('cmd_list_workspaces');
|
||||
return workspaces as Workspace[];
|
||||
},
|
||||
}).data ?? []
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user