Closed russfraze closed 8 months ago
We'll also need tests for switching between paths when the app is used. For instance, when the setup form is submitted, it should change the path to render the game, when the game is over it should change the path to render game over, etc. This can be on another ticket.
@perennialAutodidact changes made!
I have the routes index file setup like that. But I'm getting an error in the game context.
It looks like the error is coming from line 5 but I cant understand why its not importing the right way. Am I having a brain malfunction?
Could be a problem with the absolute import configuration. What's the import error say?
@perennialAutodidact now that that GAME_STAGES object is being imported from its own file like we talked about, this PR should be up to date.
## Description of changes Now a useEffect at App level automatically navigates to the path that corresponds to the current game stage.
Test steps
In the game context, change the stage value from 'PLAYING' to 'SETUP' to 'GAME_OVER' and save after each. Check that the correct game component is displayed at each path.