Force full page reload on language change (#1291)

This commit is contained in:
Keith Stevens
2023-02-09 02:19:06 +09:00
committed by GitHub
parent c9d283a1ff
commit 7c5f4635d7
@@ -37,7 +37,8 @@ const LanguageSelector = () => {
const locale = option.target.value;
setCookie("NEXT_LOCALE", locale, { path: "/" });
const path = router.asPath;
return router.push(path, path, { locale });
await router.push(path, path, { locale });
router.reload();
},
[router]
);