aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app/routes/dashboard.tsx
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-03-08 10:51:41 +0900
committernsfisis <nsfisis@gmail.com>2025-03-08 10:51:41 +0900
commita7ce31249948e4f0c1950de93f3c4f7cdda51cf4 (patch)
treec4c740f0cccd15f825596f7a115f3b8f8eb8ffa7 /frontend/app/routes/dashboard.tsx
parent7f4d16dca85263dcbc7b3bb29f5fc50f4371739d (diff)
parentc06d46eae30c9468535fb6af5e9b822acadbbdb6 (diff)
downloadphperkaigi-2025-albatross-a7ce31249948e4f0c1950de93f3c4f7cdda51cf4.tar.gz
phperkaigi-2025-albatross-a7ce31249948e4f0c1950de93f3c4f7cdda51cf4.tar.zst
phperkaigi-2025-albatross-a7ce31249948e4f0c1950de93f3c4f7cdda51cf4.zip
Merge branch 'phperkaigi-2025'
Diffstat (limited to 'frontend/app/routes/dashboard.tsx')
-rw-r--r--frontend/app/routes/dashboard.tsx27
1 files changed, 12 insertions, 15 deletions
diff --git a/frontend/app/routes/dashboard.tsx b/frontend/app/routes/dashboard.tsx
index 3a50757..08461a5 100644
--- a/frontend/app/routes/dashboard.tsx
+++ b/frontend/app/routes/dashboard.tsx
@@ -1,13 +1,13 @@
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";
export const meta: MetaFunction = () => [
- { title: "Dashboard | iOSDC Japan 2024 Albatross.swift" },
+ { title: "Dashboard | PHPerKaigi 2025 Albatross" },
];
export async function loader({ request }: LoaderFunctionArgs) {
@@ -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>
))}
@@ -86,10 +83,10 @@ export default function Dashboard() {
<a
href={
process.env.NODE_ENV === "development"
- ? "http://localhost:8002/iosdc-japan/2024/code-battle/admin/dashboard"
- : "/iosdc-japan/2024/code-battle/admin/dashboard"
+ ? "http://localhost:8003/phperkaigi/2025/code-battle/admin/dashboard"
+ : "/phperkaigi/2025/code-battle/admin/dashboard"
}
- className="text-lg text-white bg-pink-600 px-4 py-2 rounded transition duration-300 hover:bg-pink-500 focus:ring focus:ring-pink-400 focus:outline-none"
+ className="text-lg text-white bg-sky-600 px-4 py-2 rounded transition duration-300 hover:bg-sky-500 focus:ring focus:ring-sky-400 focus:outline-none"
>
Admin Dashboard
</a>