mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-09-12 12:03:06 +08:00
Force full page reload on language change (#1291)
This commit is contained in:
@@ -37,7 +37,8 @@ const LanguageSelector = () => {
|
|||||||
const locale = option.target.value;
|
const locale = option.target.value;
|
||||||
setCookie("NEXT_LOCALE", locale, { path: "/" });
|
setCookie("NEXT_LOCALE", locale, { path: "/" });
|
||||||
const path = router.asPath;
|
const path = router.asPath;
|
||||||
return router.push(path, path, { locale });
|
await router.push(path, path, { locale });
|
||||||
|
router.reload();
|
||||||
},
|
},
|
||||||
[router]
|
[router]
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user