🚸 (variables) Allow null values in variable list

This commit is contained in:
Baptiste Arnaud
2023-03-21 15:42:03 +01:00
parent c52a284013
commit 0c39ae41b6
18 changed files with 69 additions and 33 deletions

View File

@@ -92,6 +92,7 @@ export const WorkspaceProvider = ({
onError: (error) => showToast({ description: error.message }),
onSuccess: async () => {
trpcContext.workspace.listWorkspaces.invalidate()
setWorkspaceId(undefined)
},
})
@@ -154,7 +155,6 @@ export const WorkspaceProvider = ({
const deleteCurrentWorkspace = async () => {
if (!workspaceId || !workspaces || workspaces.length < 2) return
await deleteWorkspaceMutation.mutateAsync({ workspaceId })
setWorkspaceId(workspaces[0].id)
}
const refreshWorkspace = () => {