feat(editor): ✨ Restore published version button
Had to migrate webhooks into a standalone table
This commit is contained in:
@ -3,7 +3,6 @@ import { TransitionGroup, CSSTransition } from 'react-transition-group'
|
||||
import { ChatStep } from './ChatStep'
|
||||
import { AvatarSideContainer } from './AvatarSideContainer'
|
||||
import { HostAvatarsContext } from '../../contexts/HostAvatarsContext'
|
||||
import { PublicStep } from 'models'
|
||||
import { useTypebot } from '../../contexts/TypebotContext'
|
||||
import {
|
||||
isBubbleStep,
|
||||
@ -17,9 +16,10 @@ import { executeIntegration } from 'services/integration'
|
||||
import { parseRetryStep, stepCanBeRetried } from 'services/inputs'
|
||||
import { parseVariables } from 'index'
|
||||
import { useAnswers } from 'contexts/AnswersContext'
|
||||
import { Step } from 'models'
|
||||
|
||||
type ChatBlockProps = {
|
||||
steps: PublicStep[]
|
||||
steps: Step[]
|
||||
startStepIndex: number
|
||||
onScroll: () => void
|
||||
onBlockEnd: (edgeId?: string) => void
|
||||
@ -34,7 +34,7 @@ export const ChatBlock = ({
|
||||
const { typebot, updateVariableValue, createEdge, apiHost, isPreview } =
|
||||
useTypebot()
|
||||
const { resultValues } = useAnswers()
|
||||
const [displayedSteps, setDisplayedSteps] = useState<PublicStep[]>([])
|
||||
const [displayedSteps, setDisplayedSteps] = useState<Step[]>([])
|
||||
|
||||
useEffect(() => {
|
||||
const nextStep = steps[startStepIndex]
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { useAnswers } from '../../../contexts/AnswersContext'
|
||||
import { useHostAvatars } from '../../../contexts/HostAvatarsContext'
|
||||
import { InputStep, InputStepType, PublicStep } from 'models'
|
||||
import { InputStep, InputStepType, Step } from 'models'
|
||||
import { GuestBubble } from './bubbles/GuestBubble'
|
||||
import { TextForm } from './inputs/TextForm'
|
||||
import { byId, isBubbleStep, isInputStep } from 'utils'
|
||||
@ -16,7 +16,7 @@ export const ChatStep = ({
|
||||
step,
|
||||
onTransitionEnd,
|
||||
}: {
|
||||
step: PublicStep
|
||||
step: Step
|
||||
onTransitionEnd: (answerContent?: string, isRetry?: boolean) => void
|
||||
}) => {
|
||||
const { addAnswer } = useAnswers()
|
||||
|
Reference in New Issue
Block a user