From 479a201fcf1bca86c3aec2bcf813303be0f7242d Mon Sep 17 00:00:00 2001 From: Jamie Pine Date: Tue, 26 Apr 2022 18:51:50 -0700 Subject: [PATCH] clear timeout --- apps/landing/src/components/AppEmbed.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/landing/src/components/AppEmbed.tsx b/apps/landing/src/components/AppEmbed.tsx index a53a961d2..836728745 100644 --- a/apps/landing/src/components/AppEmbed.tsx +++ b/apps/landing/src/components/AppEmbed.tsx @@ -16,9 +16,10 @@ export default function AppEmbed() { // after five minutes kill the live demo useEffect(() => { - setTimeout(() => { + const timer = setTimeout(() => { setIframeAppReady(false); }, 300000); + return () => clearTimeout(timer); }, []); useEffect(() => {