diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-03-08 10:13:05 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-03-08 10:13:05 +0900 |
| commit | 8dbdf96e674c1e26d7c98af8d0608f30bc1bf166 (patch) | |
| tree | 7c82476f6bbbc71d72ab7e71e39559eca197fd95 /frontend/app/routes/dashboard.tsx | |
| parent | 54316868c3bec1ff9b04643dfe6c13cf56bf3246 (diff) | |
| parent | 1e6df136d8202c8adf65948527f4c3e7583b338c (diff) | |
| download | phperkaigi-2025-albatross-8dbdf96e674c1e26d7c98af8d0608f30bc1bf166.tar.gz phperkaigi-2025-albatross-8dbdf96e674c1e26d7c98af8d0608f30bc1bf166.tar.zst phperkaigi-2025-albatross-8dbdf96e674c1e26d7c98af8d0608f30bc1bf166.zip | |
Merge branch 'phperkaigi-2025-ws-to-polling' into phperkaigi-2025
Diffstat (limited to 'frontend/app/routes/dashboard.tsx')
| -rw-r--r-- | frontend/app/routes/dashboard.tsx | 19 |
1 files changed, 8 insertions, 11 deletions
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> ))} |
