Skip to content

Commit

Permalink
fix the issue of loosing the new added workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
Salam-Dalloul committed Oct 11, 2024
1 parent f96340a commit 4a75632
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const GlobalContextProvider: React.FC<GlobalContextProviderProps> = ({ ch
};

const updateWorkspace = (workspace: Workspace) => {
setWorkspaces({ ...workspaces, [workspace.id]: workspace });
setWorkspaces((prev) => ({ ...prev, [workspace.id]: workspace }));
};

const setAllWorkspaces = (workspaces: Record<string, Workspace>) => {
Expand Down

0 comments on commit 4a75632

Please sign in to comment.