aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-02-13 21:38:42 +0900
committernsfisis <nsfisis@gmail.com>2026-02-13 21:56:50 +0900
commit7037bd46431830e4d4ad46b2e136243e8455ac02 (patch)
tree726bf9cdf919236c5460e09ec02609014432ab49 /frontend/app
parent35e71504bcc9dd43cd0b13d78ce717d55e47c67e (diff)
downloadphperkaigi-2026-albatross-7037bd46431830e4d4ad46b2e136243e8455ac02.tar.gz
phperkaigi-2026-albatross-7037bd46431830e4d4ad46b2e136243e8455ac02.tar.zst
phperkaigi-2026-albatross-7037bd46431830e4d4ad46b2e136243e8455ac02.zip
refactor(frontend): extract APP_NAME constant for page titles
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'frontend/app')
-rw-r--r--frontend/app/config.ts1
-rw-r--r--frontend/app/routes/_index.tsx6
-rw-r--r--frontend/app/routes/dashboard.tsx6
-rw-r--r--frontend/app/routes/golf.$gameId.play.tsx5
-rw-r--r--frontend/app/routes/golf.$gameId.watch.tsx5
-rw-r--r--frontend/app/routes/login.tsx5
-rw-r--r--frontend/app/routes/tournament.tsx5
7 files changed, 15 insertions, 18 deletions
diff --git a/frontend/app/config.ts b/frontend/app/config.ts
index 9d7af47..92f764a 100644
--- a/frontend/app/config.ts
+++ b/frontend/app/config.ts
@@ -1,2 +1,3 @@
export const BASE_PATH = import.meta.env.BASE_URL || "/";
export const API_BASE_PATH = `${BASE_PATH}api/`;
+export const APP_NAME = "iOSDC Japan 2025 Albatross";
diff --git a/frontend/app/routes/_index.tsx b/frontend/app/routes/_index.tsx
index 58e4e53..207b175 100644
--- a/frontend/app/routes/_index.tsx
+++ b/frontend/app/routes/_index.tsx
@@ -2,11 +2,9 @@ import type { LoaderFunctionArgs, MetaFunction } from "react-router";
import { ensureUserNotLoggedIn } from "../.server/auth";
import BorderedContainer from "../components/BorderedContainer";
import NavigateLink from "../components/NavigateLink";
-import { BASE_PATH } from "../config";
+import { APP_NAME, BASE_PATH } from "../config";
-export const meta: MetaFunction = () => [
- { title: "iOSDC Japan 2025 Albatross" },
-];
+export const meta: MetaFunction = () => [{ title: APP_NAME }];
export async function loader({ request }: LoaderFunctionArgs) {
await ensureUserNotLoggedIn(request);
diff --git a/frontend/app/routes/dashboard.tsx b/frontend/app/routes/dashboard.tsx
index 56cc106..f44fe79 100644
--- a/frontend/app/routes/dashboard.tsx
+++ b/frontend/app/routes/dashboard.tsx
@@ -5,11 +5,9 @@ import { createApiClient } from "../api/client";
import BorderedContainerWithCaption from "../components/BorderedContainerWithCaption";
import NavigateLink from "../components/NavigateLink";
import UserIcon from "../components/UserIcon";
-import { BASE_PATH } from "../config";
+import { APP_NAME, BASE_PATH } from "../config";
-export const meta: MetaFunction = () => [
- { title: "Dashboard | iOSDC Japan 2025 Albatross" },
-];
+export const meta: MetaFunction = () => [{ title: `Dashboard | ${APP_NAME}` }];
export async function loader({ request }: LoaderFunctionArgs) {
const { user, token } = await ensureUserLoggedIn(request);
diff --git a/frontend/app/routes/golf.$gameId.play.tsx b/frontend/app/routes/golf.$gameId.play.tsx
index 1df7da8..c063d05 100644
--- a/frontend/app/routes/golf.$gameId.play.tsx
+++ b/frontend/app/routes/golf.$gameId.play.tsx
@@ -5,12 +5,13 @@ import { redirect, useLoaderData } from "react-router";
import { ensureUserLoggedIn } from "../.server/auth";
import { ApiClientContext, createApiClient } from "../api/client";
import GolfPlayApp from "../components/GolfPlayApp";
+import { APP_NAME } from "../config";
export const meta: MetaFunction<typeof loader> = ({ data }) => [
{
title: data
- ? `Golf Playing ${data.game.display_name} | iOSDC Japan 2025 Albatross`
- : "Golf Playing | iOSDC Japan 2025 Albatross",
+ ? `Golf Playing ${data.game.display_name} | ${APP_NAME}`
+ : `Golf Playing | ${APP_NAME}`,
},
];
diff --git a/frontend/app/routes/golf.$gameId.watch.tsx b/frontend/app/routes/golf.$gameId.watch.tsx
index 9eab29b..7468be5 100644
--- a/frontend/app/routes/golf.$gameId.watch.tsx
+++ b/frontend/app/routes/golf.$gameId.watch.tsx
@@ -5,12 +5,13 @@ import { redirect, useLoaderData } from "react-router";
import { ensureUserLoggedIn } from "../.server/auth";
import { ApiClientContext, createApiClient } from "../api/client";
import GolfWatchApp from "../components/GolfWatchApp";
+import { APP_NAME } from "../config";
export const meta: MetaFunction<typeof loader> = ({ data }) => [
{
title: data
- ? `Golf Watching ${data.game.display_name} | iOSDC Japan 2025 Albatross`
- : "Golf Watching | iOSDC Japan 2025 Albatross",
+ ? `Golf Watching ${data.game.display_name} | ${APP_NAME}`
+ : `Golf Watching | ${APP_NAME}`,
},
];
diff --git a/frontend/app/routes/login.tsx b/frontend/app/routes/login.tsx
index 0229729..e394a6c 100644
--- a/frontend/app/routes/login.tsx
+++ b/frontend/app/routes/login.tsx
@@ -8,10 +8,9 @@ import { ensureUserNotLoggedIn, login } from "../.server/auth";
import BorderedContainer from "../components/BorderedContainer";
import InputText from "../components/InputText";
import SubmitButton from "../components/SubmitButton";
+import { APP_NAME } from "../config";
-export const meta: MetaFunction = () => [
- { title: "Login | iOSDC Japan 2025 Albatross" },
-];
+export const meta: MetaFunction = () => [{ title: `Login | ${APP_NAME}` }];
export async function loader({ request }: LoaderFunctionArgs) {
return await ensureUserNotLoggedIn(request);
diff --git a/frontend/app/routes/tournament.tsx b/frontend/app/routes/tournament.tsx
index ffd31c0..162bd1a 100644
--- a/frontend/app/routes/tournament.tsx
+++ b/frontend/app/routes/tournament.tsx
@@ -5,10 +5,9 @@ import { createApiClient } from "../api/client";
import type { components } from "../api/schema";
import BorderedContainer from "../components/BorderedContainer";
import UserIcon from "../components/UserIcon";
+import { APP_NAME } from "../config";
-export const meta: MetaFunction = () => [
- { title: "Tournament | iOSDC Japan 2025 Albatross" },
-];
+export const meta: MetaFunction = () => [{ title: `Tournament | ${APP_NAME}` }];
export async function loader({ request }: LoaderFunctionArgs) {
const { token } = await ensureUserLoggedIn(request);