Skip to content

Commit

Permalink
refactor: update changeLanguage function to use history API for navig…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
omdxp committed Dec 31, 2024
1 parent f4ba386 commit cac3c78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/src/redux/actions/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ export const changeLanguage = (languageCode: Language["code"]) => {
newPath = newPath.replace(new RegExp(`^/${language.code}`), "");
}

window.location.replace(newPath);
window.history.pushState({}, "", newPath);
window.location.href = newPath;
};

0 comments on commit cac3c78

Please sign in to comment.