2
0

⚗️ Implement bot v2 MVP (#194)

Closes #190
This commit is contained in:
Baptiste Arnaud
2022-12-22 17:02:34 +01:00
committed by GitHub
parent e55823e011
commit 1a3869ae6d
202 changed files with 8060 additions and 1152 deletions

View File

@ -14,6 +14,7 @@ const typebotDndContext = createContext<{
setDraggedTypebot: Dispatch<SetStateAction<TypebotInDashboard | undefined>>
mouseOverFolderId?: string | null
setMouseOverFolderId: Dispatch<SetStateAction<string | undefined | null>>
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
}>({})

View File

@ -103,7 +103,7 @@ export const FolderContent = ({ folder }: Props) => {
if (newFolder) mutateFolders({ folders: [...folders, newFolder] })
}
const handleTypebotDeleted = (deletedId: string) => {
const handleTypebotDeleted = () => {
if (!typebots) return
refetchTypebots()
}
@ -206,7 +206,7 @@ export const FolderContent = ({ folder }: Props) => {
<TypebotButton
key={typebot.id.toString()}
typebot={typebot}
onTypebotDeleted={() => handleTypebotDeleted(typebot.id)}
onTypebotDeleted={handleTypebotDeleted}
onMouseDown={handleMouseDown(typebot)}
/>
))}

View File

@ -6,7 +6,6 @@ import {
useColorModeValue,
VStack,
} from '@chakra-ui/react'
import { GlobeIcon, ToolIcon } from '@/components/icons'
import { TypebotInDashboard } from '@/features/dashboard'
import { EmojiOrImageIcon } from '@/components/EmojiOrImageIcon'