Skip to content

Commit cac3c78

Browse files
committed
refactor: update changeLanguage function to use history API for navigation
1 parent f4ba386 commit cac3c78

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web/src/redux/actions/settings.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ export const changeLanguage = (languageCode: Language["code"]) => {
2424
newPath = newPath.replace(new RegExp(`^/${language.code}`), "");
2525
}
2626

27-
window.location.replace(newPath);
27+
window.history.pushState({}, "", newPath);
28+
window.location.href = newPath;
2829
};

0 commit comments

Comments
 (0)