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:
@ -1,11 +1,13 @@
|
||||
import { MenuList, MenuItem } from '@chakra-ui/react'
|
||||
import { TrashIcon } from 'assets/icons'
|
||||
import { useTypebot } from 'contexts/TypebotContext/TypebotContext'
|
||||
import { StepIndices } from 'models'
|
||||
|
||||
export const StepNodeContextMenu = ({ stepId }: { stepId: string }) => {
|
||||
type Props = { indices: StepIndices }
|
||||
export const StepNodeContextMenu = ({ indices }: Props) => {
|
||||
const { deleteStep } = useTypebot()
|
||||
|
||||
const handleDeleteClick = () => deleteStep(stepId)
|
||||
const handleDeleteClick = () => deleteStep(indices)
|
||||
|
||||
return (
|
||||
<MenuList>
|
||||
|
Reference in New Issue
Block a user