fix(i18n): quick fix for locale cookie expire when browser close

This commit is contained in:
JiPai
2024-11-18 03:31:30 +08:00
parent f7fa8e74af
commit 6af5742702

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();
};