feat: performance optimization (#22810)
This commit is contained in:
parent
cf07189bd2
commit
a366de26c4
30 changed files with 138 additions and 83 deletions
|
|
@ -11,9 +11,9 @@ export const i18n = {
|
|||
|
||||
export type Locale = typeof i18n['locales'][number]
|
||||
|
||||
export const setLocaleOnClient = (locale: Locale, reloadPage = true) => {
|
||||
export const setLocaleOnClient = async (locale: Locale, reloadPage = true) => {
|
||||
Cookies.set(LOCALE_COOKIE_NAME, locale, { expires: 365 })
|
||||
changeLanguage(locale)
|
||||
await changeLanguage(locale)
|
||||
reloadPage && location.reload()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue