import { chakra } from '@chakra-ui/system' import { useTypebot } from 'contexts/TypebotContext/TypebotContext' import React, { useMemo } from 'react' import { isDefined } from 'utils' import { DrawingEdge } from './DrawingEdge' import { Edge } from './Edge' export const Edges = () => { const { typebot } = useTypebot() const stepIdsWithTarget: string[] = useMemo(() => { if (!typebot) return [] return typebot.steps.allIds.filter((stepId) => isDefined(typebot.steps.byId[stepId].target) ) }, [typebot]) return ( {stepIdsWithTarget.map((stepId) => ( ))} ) }