From c7229048311c353d873e61a3199e0dcddac17bad Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 13 Nov 2022 00:30:48 +0100 Subject: [PATCH] prevent flicker --- repl/src/App.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/repl/src/App.jsx b/repl/src/App.jsx index addb3204..dae62bb8 100644 --- a/repl/src/App.jsx +++ b/repl/src/App.jsx @@ -109,7 +109,7 @@ const isEmbedded = window.location !== window.parent.location; function App() { const [view, setView] = useState(); // codemirror view const [lastShared, setLastShared] = useState(); - const [activeFooter, setActiveFooter] = useState('intro'); + const [activeFooter, setActiveFooter] = useState('console'); // logger const [log, setLog] = useState([]); @@ -162,8 +162,8 @@ function App() { // init code useEffect(() => { initCode().then((decoded) => { - if (decoded) { - setActiveFooter('console'); + if (!decoded) { + setActiveFooter('intro'); } logger( `Welcome to Strudel! ${