Merge pull request #716 from PaiJi/fix/storage-locale-setting-in-localstorage

fix(i18n): quick fix for locale cookie expire when browser close
This commit is contained in:
Mauricio Siu 2024-11-17 21:41:06 -06:00 committed by GitHub
commit 5db5336ec8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,7 +8,7 @@ export default function useLocale() {
const currentLocale = (Cookies.get("DOKPLOY_LOCALE") ?? "en") as Locale;
const setLocale = (locale: Locale) => {
Cookies.set("DOKPLOY_LOCALE", locale);
Cookies.set("DOKPLOY_LOCALE", locale, { expires: 365 });
window.location.reload();
};