From a6ea1709d6304398460feee5a8c77b11063772e9 Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Wed, 17 Apr 2024 10:41:31 +0530 Subject: [PATCH] fix: Removing the unexpected error on updating the workspace name to blank (#32719) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Removing the unexpected error on updating the workspace name to blank Fixes [#12996](https://github.com/appsmithorg/appsmith/issues/12996) ## Automation /ok-to-test tags="@tag.Settings @tag.Visual" ### :mag: Cypress test results > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: 741bcf622ce0d7bd1aedaef8cebac43e71fc87bf > Cypress dashboard url: Click here! ## Summary by CodeRabbit - **Refactor** - Simplified error handling in workspace operations. - Updated and streamlined the UI for renaming workspaces in the applications page. --- app/client/src/ce/pages/Applications/index.tsx | 4 ---- app/client/src/ce/sagas/WorkspaceSagas.ts | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/client/src/ce/pages/Applications/index.tsx b/app/client/src/ce/pages/Applications/index.tsx index 39dac179be..f56d574e27 100644 --- a/app/client/src/ce/pages/Applications/index.tsx +++ b/app/client/src/ce/pages/Applications/index.tsx @@ -49,7 +49,6 @@ import { import { AppIconCollection, Classes, - EditableText, MenuItem as ListItem, Text, TextType, @@ -450,9 +449,6 @@ export const WorkspaceNameWrapper = styled.div<{ disabled?: boolean }>` color: ${(props) => props.theme.colors.applications.iconColor}; } `; -export const WorkspaceRename = styled(EditableText)` - padding: 0 2px; -`; export const NoSearchResultImg = styled.img` margin: 1em; diff --git a/app/client/src/ce/sagas/WorkspaceSagas.ts b/app/client/src/ce/sagas/WorkspaceSagas.ts index 6fd243e9e2..d1f8c7a1ed 100644 --- a/app/client/src/ce/sagas/WorkspaceSagas.ts +++ b/app/client/src/ce/sagas/WorkspaceSagas.ts @@ -264,7 +264,7 @@ export function* saveWorkspaceSaga(action: ReduxAction) { yield put({ type: ReduxActionErrorTypes.SAVE_WORKSPACE_ERROR, payload: { - error: (error as Error).message, + error, }, }); }