From 49f3b9021db2ab4ed3b50ca9b87eba3a7941d40c Mon Sep 17 00:00:00 2001 From: Katie Stahl Date: Thu, 12 Sep 2024 14:31:38 -0400 Subject: [PATCH] removing redundant comments --- client/src/components/Pages/Structure/Builder/Builder.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/client/src/components/Pages/Structure/Builder/Builder.tsx b/client/src/components/Pages/Structure/Builder/Builder.tsx index b40d214..8456e33 100644 --- a/client/src/components/Pages/Structure/Builder/Builder.tsx +++ b/client/src/components/Pages/Structure/Builder/Builder.tsx @@ -171,15 +171,10 @@ const Builder: React.FC = () => { const { source, destination } = result; setFusion((prevFusion) => { - const sourceClone = Array.from(prevFusion.structure); // Use the latest state - - // Remove the element from the source index and store it + const sourceClone = Array.from(prevFusion.structure); const [movedElement] = sourceClone.splice(source.index, 1); - - // Insert the moved element at the destination index sourceClone.splice(destination.index, 0, movedElement); - // Return the updated fusion structure return { ...prevFusion, structure: sourceClone }; }); };