Fix replaceState bug

This commit is contained in:
Lynn 2022-01-18 15:36:31 +01:00
parent f26abca2ec
commit 22e2b3866b

View file

@ -66,7 +66,8 @@ function Game(props: GameProps) {
const [gameNumber, setGameNumber] = useState(1);
const startNextGame = () => {
if (challenge) {
window.history.replaceState("", "", "/");
// Clear the URL parameters:
window.history.replaceState({}, document.title, window.location.pathname);
}
setChallenge("");
setTarget(randomTarget(wordLength));