From 1e6df136d8202c8adf65948527f4c3e7583b338c Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Tue, 4 Mar 2025 22:55:01 +0900
Subject: websocket to polling

---
 frontend/app/routes/dashboard.tsx | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

(limited to 'frontend/app/routes/dashboard.tsx')

diff --git a/frontend/app/routes/dashboard.tsx b/frontend/app/routes/dashboard.tsx
index cf5453c..08461a5 100644
--- a/frontend/app/routes/dashboard.tsx
+++ b/frontend/app/routes/dashboard.tsx
@@ -1,7 +1,7 @@
 import type { LoaderFunctionArgs, MetaFunction } from "@remix-run/node";
 import { Form, useLoaderData } from "@remix-run/react";
-import { apiGetGames } from "../.server/api/client";
 import { ensureUserLoggedIn } from "../.server/auth";
+import { apiGetGames } from "../api/client";
 import BorderedContainer from "../components/BorderedContainer";
 import NavigateLink from "../components/NavigateLink";
 import UserIcon from "../components/UserIcon";
@@ -39,7 +39,7 @@ export default function Dashboard() {
 			<BorderedContainer>
 				<div className="px-4">
 					{games.length === 0 ? (
-						<p>エントリーしている試合はありません</p>
+						<p>エントリーできる試合はありません</p>
 					) : (
 						<ul className="divide-y">
 							{games.map((game) => (
@@ -58,15 +58,12 @@ export default function Dashboard() {
 										</span>
 									</div>
 									<span>
-										{game.state === "closed" || game.state === "finished" ? (
-											<span className="text-lg text-gray-400 bg-gray-200 px-4 py-2 rounded">
-												入室
-											</span>
-										) : (
-											<NavigateLink to={`/golf/${game.game_id}/play`}>
-												入室
-											</NavigateLink>
-										)}
+										<NavigateLink to={`/golf/${game.game_id}/play`}>
+											対戦
+										</NavigateLink>
+										<NavigateLink to={`/golf/${game.game_id}/watch`}>
+											観戦
+										</NavigateLink>
 									</span>
 								</li>
 							))}
-- 
cgit v1.2.3-70-g09d2

