2
0

chore(editor): ♻️ Revert tables to arrays

Yet another refacto. I improved many many mechanisms on this one including dnd. It is now end 2 end tested 🎉
This commit is contained in:
Baptiste Arnaud
2022-02-04 19:00:08 +01:00
parent 8a350eee6c
commit 524ef0812c
123 changed files with 2998 additions and 3112 deletions

View File

@ -1,12 +1,13 @@
import { chakra } from '@chakra-ui/system'
import { useTypebot } from 'contexts/TypebotContext/TypebotContext'
import { Edge as EdgeProps } from 'models'
import React from 'react'
import { DrawingEdge } from './DrawingEdge'
import { Edge } from './Edge'
export const Edges = () => {
const { typebot } = useTypebot()
type Props = {
edges: EdgeProps[]
}
export const Edges = ({ edges }: Props) => {
return (
<chakra.svg
width="full"
@ -17,8 +18,8 @@ export const Edges = () => {
top="0"
>
<DrawingEdge />
{typebot?.edges.allIds.map((edgeId) => (
<Edge key={edgeId} edgeId={edgeId} />
{edges.map((edge) => (
<Edge key={edge.id} edge={edge} />
))}
<marker
id={'arrow'}