Skip to content

Commit

Permalink
removing redundant comments
Browse files Browse the repository at this point in the history
  • Loading branch information
katiestahl committed Sep 12, 2024
1 parent 8d6d11c commit 49f3b90
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions client/src/components/Pages/Structure/Builder/Builder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
});
};
Expand Down

0 comments on commit 49f3b90

Please sign in to comment.