2
0

feat(dashboard): ️ Delete workspace button

This commit is contained in:
Baptiste Arnaud
2022-05-17 08:59:02 -07:00
parent d0119ee24b
commit b7b034432a
6 changed files with 114 additions and 7 deletions

View File

@ -38,6 +38,14 @@ export const updateWorkspace = async (updates: Partial<Workspace>) =>
body: updates,
})
export const deleteWorkspace = (workspaceId: string) =>
sendRequest<{
workspace: Workspace
}>({
url: `/api/workspaces/${workspaceId}`,
method: 'DELETE',
})
export const planToReadable = (plan?: Plan) => {
if (!plan) return
switch (plan) {