2
0

feat(editor): ️ Improve previewing blocks

This commit is contained in:
Baptiste Arnaud
2022-04-02 12:03:21 +02:00
parent 05009814d4
commit 327da3104d
3 changed files with 46 additions and 35 deletions

View File

@ -38,8 +38,9 @@ export const BlockNode = ({ block, blockIndex }: Props) => {
const [isMouseDown, setIsMouseDown] = useState(false)
const [isConnecting, setIsConnecting] = useState(false)
const isPreviewing =
previewingEdge?.to.blockId === block.id ||
previewingEdge?.from.blockId === block.id
previewingEdge?.from.blockId === block.id ||
(previewingEdge?.to.blockId === block.id &&
isNotDefined(previewingEdge.to.stepId))
const isStartBlock =
isDefined(block.steps[0]) && block.steps[0].type === 'start'