UPDATE: New data, optimize, new name for trailblazer
All checks were successful
Gitea Auto Deploy / Deploy-Container (push) Successful in 1m1s

This commit is contained in:
2026-01-30 17:13:23 +07:00
parent f81fa964a5
commit c278b8bce0
55 changed files with 878 additions and 950 deletions

View File

@@ -1,8 +1,10 @@
import { listCurrentLanguage } from "@/constant/constant";
import { CharacterBasic, EventBasic, LightConeBasic, MonsterBasic } from "@/types";
import { useTranslations } from "next-intl"
type TFunc = ReturnType<typeof useTranslations>
export function getNameChar(locale: string, data: CharacterBasic | undefined): string {
export function getNameChar(locale: string, t: TFunc, data: CharacterBasic | undefined): string {
if (!data) {
return ""
}
@@ -14,10 +16,8 @@ export function getNameChar(locale: string, data: CharacterBasic | undefined): s
if (!text) {
text = data.lang.get("en") ?? "";
}
if (Number(data.id) % 2 === 0 && Number(data.id) > 8000) {
text = `Female ${data.damageType} MC`
} else if (Number(data.id) > 8000) {
text = `Male ${data.damageType} MC`
if (Number(data.id) > 8000) {
text = `${t("trailblazer")} ${t(data?.baseType?.toLowerCase() ?? "")}`;
}
return text
}