From 5e0768820e29a424df153ff5d5bb2e6af4405665 Mon Sep 17 00:00:00 2001 From: Chaitanya Kharya Date: Thu, 28 Sep 2023 15:37:08 +0530 Subject: [PATCH] fixed toast for multiple components selection (#7239) * fixed toast for multiple components selection * Update frontend/src/_helpers/appUtils.js Co-authored-by: Chetan Kumar * Resolved the code comments --------- Co-authored-by: Chetan Kumar Co-authored-by: Kavin Venkatachalam --- frontend/src/_helpers/appUtils.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/_helpers/appUtils.js b/frontend/src/_helpers/appUtils.js index a2fefd4e3e..39217d7d29 100644 --- a/frontend/src/_helpers/appUtils.js +++ b/frontend/src/_helpers/appUtils.js @@ -1383,7 +1383,9 @@ export const cloneComponents = (_ref, updateAppDefinition, isCloning = true, isC updateAppDefinition(newDefinition); } else { navigator.clipboard.writeText(JSON.stringify(newComponentObj)); - toast.success('Component copied succesfully'); + const successMessage = + newComponentObj.newComponents.length > 1 ? 'Components copied successfully' : 'Component copied successfully'; + toast.success(successMessage); } _ref.setState({ currentSidebarTab: 2 }); };