diff --git a/.node-version b/.node-version new file mode 100644 index 0000000..3c03207 --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +18 diff --git a/package.json b/package.json index eef08eb..3333bb1 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "@testing-library/react": "^14.2.0", "@testing-library/user-event": "^13.2.1", "@types/jest": "^27.0.1", - "@types/node": "^16.7.13", + "@types/node": "^18.0.0", "@types/react": "^18.2.48", "@types/react-dom": "^18.2.18", "buffer": "^6.0.3", @@ -64,7 +64,7 @@ ] }, "engines": { - "node": ">=16" + "node": ">=18" }, "devDependencies": { "@storybook/addon-a11y": "^6.4.19", diff --git a/src/components/Instructions/Instructions.tsx b/src/components/Instructions/Instructions.tsx index 65e6eb8..4c0a0be 100644 --- a/src/components/Instructions/Instructions.tsx +++ b/src/components/Instructions/Instructions.tsx @@ -17,7 +17,7 @@ export const Instructions = () => { type: SettingsTypes.SetInstructionsShown, payload: { shown: true }, }); - }, [ ]); + }, [dispatch]); const secretCode: PegColor[] = [ PegColor.Black, diff --git a/src/routes/GameRoute/GameRoute.tsx b/src/routes/GameRoute/GameRoute.tsx index ee97ecd..5257b57 100644 --- a/src/routes/GameRoute/GameRoute.tsx +++ b/src/routes/GameRoute/GameRoute.tsx @@ -62,7 +62,7 @@ export const GameRoute = () => { type: GameTypes.LoadGame, payload: { game }, }); - }, [searchParams, state.games.pastGames, location.state]); + }, [searchParams, state.games.pastGames, location.state, dispatch]); useEffect(() => { let locationState = location.state as { backgroundLocation?: Location }; @@ -109,7 +109,7 @@ export const GameRoute = () => { state: { backgroundLocation: location }, }); } - }, [location, navigate, state.games.currentGame.gameState, state.games.currentGame.settings.endScreenShown, searchParams]); + }, [location, navigate, state.games.currentGame.gameState, state.games.currentGame.settings.endScreenShown, searchParams, dispatch]); return (