fix: activation page reload issue after activating (#964)
This commit is contained in:
parent
a38412de7b
commit
916d8be0ae
3 changed files with 13 additions and 12 deletions
|
|
@ -9,8 +9,8 @@ export const getLocaleOnClient = (): Locale => {
|
|||
return Cookies.get(LOCALE_COOKIE_NAME) as Locale || i18n.defaultLocale
|
||||
}
|
||||
|
||||
export const setLocaleOnClient = (locale: Locale) => {
|
||||
export const setLocaleOnClient = (locale: Locale, reloadPage = true) => {
|
||||
Cookies.set(LOCALE_COOKIE_NAME, locale)
|
||||
changeLanguage(locale)
|
||||
location.reload()
|
||||
reloadPage && location.reload()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue