From 6af574270204c5c8c64bad91c0c275998a732ad6 Mon Sep 17 00:00:00 2001 From: JiPai Date: Mon, 18 Nov 2024 03:31:30 +0800 Subject: [PATCH] fix(i18n): quick fix for locale cookie expire when browser close --- apps/dokploy/utils/hooks/use-locale.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dokploy/utils/hooks/use-locale.ts b/apps/dokploy/utils/hooks/use-locale.ts index f00e0df84..72ac6ab07 100644 --- a/apps/dokploy/utils/hooks/use-locale.ts +++ b/apps/dokploy/utils/hooks/use-locale.ts @@ -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(); };