From ce20bb725acf7150884d884cac054edbe6eafcd0 Mon Sep 17 00:00:00 2001 From: hexastack Date: Thu, 31 Oct 2024 10:39:34 +0100 Subject: [PATCH] fix: remove unnecessary snippet --- .../components/visual-editor/v2/Diagrams.tsx | 26 ++++--------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/frontend/src/components/visual-editor/v2/Diagrams.tsx b/frontend/src/components/visual-editor/v2/Diagrams.tsx index 34ae954..3783755 100644 --- a/frontend/src/components/visual-editor/v2/Diagrams.tsx +++ b/frontend/src/components/visual-editor/v2/Diagrams.tsx @@ -453,28 +453,12 @@ const Diagrams = () => { if (ids) { for (const blockId of ids) { - const block = getBlockFromCache(blockId); - - await updateBlock( - { - id: blockId, - params: { - category: newCategoryId, - }, + await updateBlock({ + id: blockId, + params: { + category: newCategoryId, }, - { - onSuccess() { - updateCachedBlock({ - id: blockId, - payload: { - ...block, - category: newCategoryId, - }, - strategy: "overwrite", - }); - }, - }, - ); + }); } queryClient.removeQueries({