diff options
Diffstat (limited to 'frontend/app/routes/golf.$gameId.watch.tsx')
| -rw-r--r-- | frontend/app/routes/golf.$gameId.watch.tsx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/frontend/app/routes/golf.$gameId.watch.tsx b/frontend/app/routes/golf.$gameId.watch.tsx index 28c17cc..4093295 100644 --- a/frontend/app/routes/golf.$gameId.watch.tsx +++ b/frontend/app/routes/golf.$gameId.watch.tsx @@ -1,9 +1,19 @@ -import type { LoaderFunctionArgs } from "@remix-run/node"; +import type { LoaderFunctionArgs, MetaFunction } from "@remix-run/node"; import { isAuthenticated } from "../.server/auth"; import { apiClient } from "../.server/api/client"; import { useLoaderData } from "@remix-run/react"; import GolfWatchApp from "../components/GolfWatchApp"; +export const meta: MetaFunction<typeof loader> = ({ data }) => { + return [ + { + title: data + ? `Golf Watching ${data.game.display_name} | iOSDC 2024 Albatross.swift` + : "Golf Watching | iOSDC 2024 Albatross.swift", + }, + ]; +}; + export async function loader({ params, request }: LoaderFunctionArgs) { const { token } = await isAuthenticated(request, { failureRedirect: "/login", |
