diff --git a/app/routes/analyzer.tsx b/app/routes/analyzer.tsx index d33039fc5..68d988c32 100644 --- a/app/routes/analyzer.tsx +++ b/app/routes/analyzer.tsx @@ -1,20 +1,28 @@ -import { type LinksFunction } from "@remix-run/node"; +import { type MetaFunction, type LinksFunction } from "@remix-run/node"; import { useTranslation } from "react-i18next"; import { AbilitiesSelector } from "~/components/AbilitiesSelector"; import { Ability } from "~/components/Ability"; import { WeaponCombobox } from "~/components/Combobox"; import { Image } from "~/components/Image"; import { Main } from "~/components/Main"; +import { useSetTitle } from "~/hooks/useSetTitle"; import type { AnalyzedBuild, Stat } from "~/modules/analyzer"; import { useAnalyzeBuild } from "~/modules/analyzer"; import type { MainWeaponId, SubWeaponId } from "~/modules/in-game-lists"; import styles from "~/styles/analyzer.css"; +import { makeTitle } from "~/utils/strings"; import { specialWeaponImageUrl, subWeaponImageUrl } from "~/utils/urls"; // xxx: charge hold frames export const CURRENT_PATCH = "1.1"; +export const meta: MetaFunction = () => { + return { + title: makeTitle("Build Analyzer"), + }; +}; + export const links: LinksFunction = () => { return [{ rel: "stylesheet", href: styles }]; }; @@ -24,7 +32,8 @@ export const handle = { }; export default function BuildAnalyzerPage() { - const { t } = useTranslation("analyzer"); + const { t } = useTranslation(["analyzer", "common"]); + useSetTitle(t("common:pages.buildAnalyzer")); const { build, setBuild, mainWeaponId, setMainWeaponId, analyzed } = useAnalyzeBuild(); @@ -51,40 +60,40 @@ export default function BuildAnalyzerPage() {
- {t("patch")} {CURRENT_PATCH} + {t("analyzer:patch")} {CURRENT_PATCH}
- + {typeof analyzed.weapon.brellaCanopyHp === "number" && ( )} - + - + {analyzed.stats.damages.length > 0 && ( 0 && ( )} - + - +
diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 6db053eaa..8ab605b18 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -6,6 +6,7 @@ "pages.calendar": "Calendar", "pages.faq": "FAQ", "pages.builds": "Builds", + "pages.buildAnalyzer": "Build Analyzer", "header.profile": "Profile", "header.logout": "Log out",