mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-13 11:42:10 +00:00
format code
This commit is contained in:
parent
311ca1c990
commit
ec5e28ba9f
4 changed files with 17 additions and 3 deletions
|
@ -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";
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue