Feat: delete template button (#3781)

* Add api call

* Extract DropDownButton

* Start adding DropdownButton to Template page

* Move stories to dropdown button

* Format

* Update xservice to delete

* Deletion flow

* Format

* Move ErrorSummary for consistency

* RBAC (unfinished) and style tweak

* Format

* Test rbac

* Format

* Move ErrorSummary under PageHeader in workspace and template

* Format

* Replace hook with onBlur

* Make style arg optional

* Format
This commit is contained in:
Presley Pizzo
2022-09-01 14:24:14 -04:00
committed by GitHub
parent 6826b976d7
commit 6d95145d3b
20 changed files with 618 additions and 408 deletions
+5
View File
@@ -153,6 +153,11 @@ export const updateTemplateMeta = async (
return response.data
}
export const deleteTemplate = async (templateId: string): Promise<TypesGen.Template> => {
const response = await axios.delete<TypesGen.Template>(`/api/v2/templates/${templateId}`)
return response.data
}
export const getWorkspace = async (
workspaceId: string,
params?: TypesGen.WorkspaceOptions,