♻️ Introduce typebot v6 with events (#1013)

Closes #885
This commit is contained in:
Baptiste Arnaud
2023-11-08 15:34:16 +01:00
committed by GitHub
parent 68e4fc71fb
commit 35300eaf34
634 changed files with 58971 additions and 31449 deletions

View File

@@ -52,7 +52,7 @@ export const TypebotButton = ({
const { showToast } = useToast()
const { mutate: createTypebot } = trpc.typebot.createTypebot.useMutation({
const { mutate: importTypebot } = trpc.typebot.importTypebot.useMutation({
onError: (error) => {
showToast({ description: error.message })
},
@@ -103,12 +103,10 @@ export const TypebotButton = ({
typebotId: typebot.id,
})
if (!typebotToDuplicate) return
createTypebot({
importTypebot({
workspaceId: typebotToDuplicate.workspaceId,
typebot: {
...typebotToDuplicate,
customDomain: undefined,
publicId: undefined,
name: duplicateName(typebotToDuplicate.name),
},
})