Merge branch 'main' into main

This commit is contained in:
expload 2024-05-13 17:57:14 +08:00 committed by GitHub
commit 755acbddb2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 181 additions and 1 deletions

View file

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

View file

@ -1,5 +1,6 @@
import { formatDistance } from "date-fns";
import type { FormatDistanceOptions } from "date-fns";
import {
ptBR,
enUS,
@ -12,7 +13,9 @@ import {
it,
be,
zhCN,
da
} from "date-fns/locale";
import { useTranslation } from "react-i18next";
export function useDate() {
@ -31,6 +34,7 @@ export function useDate() {
if (language.startsWith("it")) return it;
if (language.startsWith("be")) return be;
if (language.startsWith("zh")) return zhCN;
if (language.startsWith("da")) return da;
return enUS;
};