Move request-related settings to workspace

This commit is contained in:
Gregory Schier
2024-01-15 11:52:36 -08:00
parent 3539642491
commit 77bf5a58d8
23 changed files with 207 additions and 148 deletions

View File

@@ -21,6 +21,7 @@ export function useUpdateWorkspace(id: string | null) {
if (workspace === null) return;
const newWorkspace = typeof v === 'function' ? v(workspace) : { ...workspace, ...v };
console.log('NEW WORKSPACE', newWorkspace);
queryClient.setQueryData<Workspace[]>(workspacesQueryKey(workspace), (workspaces) =>
(workspaces ?? []).map((w) => (w.id === newWorkspace.id ? newWorkspace : w)),
);