2
0

fix: Allow webhook with basic auth

This commit is contained in:
Baptiste Arnaud
2022-02-15 12:36:08 +01:00
parent b95d907e8f
commit 93e8f90ac3
9 changed files with 38 additions and 37 deletions

View File

@ -19,7 +19,6 @@ import { parseRetryStep, stepCanBeRetried } from 'services/inputs'
type ChatBlockProps = {
steps: PublicStep[]
startStepIndex: number
blockIndex: number
onScroll: () => void
onBlockEnd: (edgeId?: string) => void
}
@ -27,7 +26,6 @@ type ChatBlockProps = {
export const ChatBlock = ({
steps,
startStepIndex,
blockIndex,
onScroll,
onBlockEnd,
}: ChatBlockProps) => {
@ -35,8 +33,6 @@ export const ChatBlock = ({
useTypebot()
const [displayedSteps, setDisplayedSteps] = useState<PublicStep[]>([])
const currentStepIndex = displayedSteps.length - 1
useEffect(() => {
const nextStep = steps[startStepIndex]
if (nextStep) setDisplayedSteps([...displayedSteps, nextStep])
@ -65,8 +61,9 @@ export const ChatBlock = ({
step: currentStep,
context: {
apiHost,
typebotId: typebot.id,
indices: { blockIndex, stepIndex: currentStepIndex },
typebotId: typebot.typebotId,
blockId: currentStep.blockId,
stepId: currentStep.id,
variables: typebot.variables,
isPreview,
updateVariableValue,