2
0

refactor(♻️ Add defaults everywhere (+ settings page)):

This commit is contained in:
Baptiste Arnaud
2022-01-25 18:19:37 +01:00
parent 21448bcc8a
commit c5aaa323d1
115 changed files with 1436 additions and 720 deletions

View File

@ -5,7 +5,7 @@ import { useFrame } from 'react-frame-component'
import { setCssVariablesValue } from '../services/theme'
import { useAnswers } from '../contexts/AnswersContext'
import { deepEqual } from 'fast-equals'
import { Answer, Block, Edge, PublicTypebot } from 'models'
import { Answer, Block, PublicTypebot } from 'models'
type Props = {
typebot: PublicTypebot
@ -45,6 +45,7 @@ export const ConversationContainer = ({
typebot.steps.byId[blocks.byId[blocks.allIds[0]].stepIds[0]].edgeId
if (!firstEdgeId) return
displayNextBlock(firstEdgeId)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
useEffect(() => {
@ -56,6 +57,7 @@ export const ConversationContainer = ({
if (!answer || deepEqual(localAnswer, answer)) return
setLocalAnswer(answer)
onNewAnswer(answer)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [answers])
return (