chore: lint

This commit is contained in:
190km
2024-12-26 01:26:53 +01:00
parent c3476a1fdf
commit 46348f43f6
5 changed files with 31 additions and 26 deletions

View File

@@ -1,10 +1,11 @@
import type { Languages } from "@/lib/languages";
import { LanguageCode } from "@/lib/languages";
import Cookies from "js-cookie";
export default function useLocale() {
const currentLocale = (Cookies.get("DOKPLOY_LOCALE") ?? "en") as Languages;
const currentLocale = (Cookies.get("DOKPLOY_LOCALE") ?? "en") as LanguageCode;
const setLocale = (locale: Languages) => {
const setLocale = (locale: LanguageCode) => {
Cookies.set("DOKPLOY_LOCALE", locale, { expires: 365 });
window.location.reload();
};