chore(site): Use react-query and refactor the workspaces page to use it (#5838)

This commit is contained in:
Bruno Quaresma
2023-01-24 16:22:42 -03:00
committed by GitHub
parent bef9e72078
commit 36384aa3c1
22 changed files with 499 additions and 314 deletions
+7
View File
@@ -779,3 +779,10 @@ export const getTemplateVersionLogs = async (
)
return response.data
}
export const updateWorkspaceVersion = async (
workspace: TypesGen.Workspace,
): Promise<TypesGen.WorkspaceBuild> => {
const template = await getTemplate(workspace.template_id)
return startWorkspace(workspace.id, template.active_version_id)
}