(editor) Add unpublish and close typebot options

Introducing more menu items on the "Publised" button in the editor. You can now unpublish a typebot and close it to new
responses
This commit is contained in:
Baptiste Arnaud
2022-10-06 08:33:46 +02:00
parent 7ca97d4606
commit bfed599695
80 changed files with 1112 additions and 961 deletions

View File

@@ -1,3 +1,4 @@
import { TypebotViewerProps } from 'components/TypebotViewer'
import { LinkedTypebot } from 'contexts/TypebotContext'
import { Log } from 'db'
import {
@@ -26,7 +27,7 @@ type EdgeId = string
type LogicContext = {
isPreview: boolean
apiHost: string
typebot: PublicTypebot
typebot: TypebotViewerProps['typebot']
linkedTypebots: LinkedTypebot[]
currentTypebotId: string
pushEdgeIdInLinkedTypebotQueue: (bot: {
@@ -46,7 +47,7 @@ export const executeLogic = async (
context: LogicContext
): Promise<{
nextEdgeId?: EdgeId
linkedTypebot?: PublicTypebot | LinkedTypebot
linkedTypebot?: TypebotViewerProps['typebot'] | LinkedTypebot
}> => {
switch (block.type) {
case LogicBlockType.SET_VARIABLE: