format code

This commit is contained in:
expload 2024-05-13 09:30:40 +00:00
parent 311ca1c990
commit ec5e28ba9f
4 changed files with 17 additions and 3 deletions

View file

@ -25,6 +25,7 @@ export const getSteamLanguage = (language: string) => {
if (language.startsWith("it")) return "italian";
if (language.startsWith("hu")) return "hungarian";
if (language.startsWith("pl")) return "polish";
if (language.startsWith("zh")) return "chinese";
return "english";
};

View file

@ -1,6 +1,18 @@
import { formatDistance } from "date-fns";
import type { FormatDistanceOptions } from "date-fns";
import { ptBR, enUS, es, fr, pl, hu, tr, ru, it, be } from "date-fns/locale";
import {
ptBR,
enUS,
es,
fr,
pl,
hu,
tr,
ru,
it,
be,
zhCN,
} from "date-fns/locale";
import { useTranslation } from "react-i18next";
export function useDate() {
@ -18,6 +30,7 @@ export function useDate() {
if (language.startsWith("ru")) return ru;
if (language.startsWith("it")) return it;
if (language.startsWith("be")) return be;
if (language.startsWith("zh")) return zhCN;
return enUS;
};