From e0fbddb281dfe8ccbcb33c3d5f385b6ad402a476 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Mon, 29 Jul 2024 20:14:16 +0900
Subject: feat(frontend): set meta title

---
 frontend/app/routes/golf.$gameId.watch.tsx | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

(limited to 'frontend/app/routes/golf.$gameId.watch.tsx')

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",
-- 
cgit v1.2.3-70-g09d2

