From fb2f9cc3aa9e9b2cacf297bba008f489eeac4b18 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Tue, 18 Jul 2023 23:38:43 +0200 Subject: [PATCH] load showHelp on changing level --- client/src/components/level.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/client/src/components/level.tsx b/client/src/components/level.tsx index 8d2cfda..2c85388 100644 --- a/client/src/components/level.tsx +++ b/client/src/components/level.tsx @@ -93,14 +93,13 @@ function PlayableLevel({worldId, levelId}) { // // TODO: Thats the wrong behaviour probably // chatRef.current!.scrollTo(0,0) + // TODO: That's a problem if the saved proof contains an error // Reset command line input when loading a new level setCommandLineInput("") - }, [levelId]) - // Load the selected help steps from the store - useEffect(() => { + // Load the selected help steps from the store setShowHelp(new Set(selectHelp(gameId, worldId, levelId)(store.getState()))) - }, []) + }, [gameId, worldId, levelId]) useEffect(() => { // TODO: For some reason this is always called twice