From 93639c1fc6c932d8e1fe8b58b72809664605b532 Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Fri, 4 Mar 2022 16:09:41 +0100 Subject: [PATCH] =?UTF-8?q?fix(viewer):=20=F0=9F=90=9B=20Attempt=20to=20fi?= =?UTF-8?q?x=20loading=20issue=20in=20iframe=20safari?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/viewer/layouts/TypebotPage.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/viewer/layouts/TypebotPage.tsx b/apps/viewer/layouts/TypebotPage.tsx index 283adb093f..dc5934b16d 100644 --- a/apps/viewer/layouts/TypebotPage.tsx +++ b/apps/viewer/layouts/TypebotPage.tsx @@ -27,9 +27,11 @@ export const TypebotPage = ({ const [resultId, setResultId] = useState() // Workaround for react-frame-component bug (https://github.com/ryanseddon/react-frame-component/pull/207) + // eslint-disable-next-line react-hooks/exhaustive-deps useEffect(() => { + if (showTypebot) return setShowTypebot(true) - }, []) + }) const initializeResult = async (variables: VariableWithValue[]) => { const resultIdFromSession = getExistingResultFromSession()