Skip to content

Commit

Permalink
Prevent refitting on each multiplayer guess
Browse files Browse the repository at this point in the history
  • Loading branch information
codergautam committed Nov 19, 2024
1 parent a34d511 commit 48cb58b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function MapPlugin({ pinPoint, setPinPoint, answerShown, dest, gameOptions, ws,
map.setView([30, 0], 2);
}
}, 500);
}, [gameOptions?.extent, answerShown, map]);
}, [gameOptions?.extent ? JSON.stringify(gameOptions.extent) : null, map, answerShown]);

useEffect(() => {
if (pinPoint) {
Expand Down

0 comments on commit 48cb58b

Please sign in to comment.