2
0

🚸 (bot) Avoid waiting for blocks with no returned data

This commit is contained in:
Baptiste Arnaud
2022-11-16 15:21:09 +01:00
parent 6725c17a02
commit 2bd7cee58e
7 changed files with 36 additions and 32 deletions

View File

@ -58,7 +58,7 @@ export const BlockNode = ({
setFocusedGroupId,
previewingEdge,
} = useGraph()
const { mouseOverBlock, setMouseOverBlock, draggedItem } = useBlockDnd()
const { mouseOverBlock, setMouseOverBlock } = useBlockDnd()
const { typebot, updateBlock } = useTypebot()
const [isConnecting, setIsConnecting] = useState(false)
const [isPopoverOpened, setIsPopoverOpened] = useState(
@ -105,7 +105,7 @@ export const BlockNode = ({
}
const handleMouseEnter = () => {
if (draggedItem !== undefined)
if (mouseOverBlock?.id !== block.id)
setMouseOverBlock({ id: block.id, ref: blockRef })
if (connectingIds)
setConnectingIds({