♻️ Normalize data
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
import { MenuList, MenuItem } from '@chakra-ui/react'
|
||||
import { TrashIcon } from 'assets/icons'
|
||||
import { useTypebot } from 'contexts/TypebotContext'
|
||||
import { useTypebot } from 'contexts/TypebotContext/TypebotContext'
|
||||
|
||||
export const BlockNodeContextMenu = ({ blockId }: { blockId: string }) => {
|
||||
const { removeBlock } = useTypebot()
|
||||
const { deleteBlock } = useTypebot()
|
||||
|
||||
const handleDeleteClick = () => deleteBlock(blockId)
|
||||
|
||||
const handleDeleteClick = () => {
|
||||
removeBlock(blockId)
|
||||
}
|
||||
return (
|
||||
<MenuList>
|
||||
<MenuItem icon={<TrashIcon />} onClick={handleDeleteClick}>
|
||||
|
||||
Reference in New Issue
Block a user