2
0

feat(viewer): Add variables in URL support

This commit is contained in:
Baptiste Arnaud
2022-02-17 10:46:04 +01:00
parent f7d6f0b766
commit 6e0ab67502
15 changed files with 550 additions and 58 deletions

View File

@ -31,7 +31,10 @@ export const TypebotContext = ({
const [localTypebot, setLocalTypebot] = useState<PublicTypebot>(typebot)
useEffect(() => {
setLocalTypebot({ ...localTypebot, theme: typebot.theme })
setLocalTypebot((localTypebot) => ({
...localTypebot,
theme: typebot.theme,
}))
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [typebot.theme])