load showHelp on changing level

This commit is contained in:
Jon Eugster
2023-07-18 23:38:43 +02:00
parent 48b55a9ebc
commit fb2f9cc3aa
+3 -4
View File
@@ -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