From f5b6c2f14d3521e9763ba7a356b8e87ebc6d7cd9 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 1 Aug 2024 01:19:00 +0900 Subject: feat: change procedure of game starting --- frontend/app/routes/admin.games_.$gameId.tsx | 39 ++++++++++++++++------------ frontend/app/routes/logout.tsx | 1 + 2 files changed, 23 insertions(+), 17 deletions(-) (limited to 'frontend') diff --git a/frontend/app/routes/admin.games_.$gameId.tsx b/frontend/app/routes/admin.games_.$gameId.tsx index 244092e..ff8f136 100644 --- a/frontend/app/routes/admin.games_.$gameId.tsx +++ b/frontend/app/routes/admin.games_.$gameId.tsx @@ -57,7 +57,7 @@ export async function action({ request, params }: ActionFunctionArgs) { action === "open" ? "waiting_entries" : action === "start" - ? "waiting_start" + ? "prepare" : null; if (!nextState) { throw new Error("Invalid action"); @@ -79,6 +79,7 @@ export async function action({ request, params }: ActionFunctionArgs) { if (error) { throw new Error(error.message); } + return null; } export default function AdminGameEdit() { @@ -103,22 +104,26 @@ export default function AdminGameEdit() {
- - +
+ +
+
+ +
diff --git a/frontend/app/routes/logout.tsx b/frontend/app/routes/logout.tsx index f48081d..030bde0 100644 --- a/frontend/app/routes/logout.tsx +++ b/frontend/app/routes/logout.tsx @@ -3,4 +3,5 @@ import { authenticator } from "../.server/auth"; export async function action({ request }: ActionFunctionArgs) { await authenticator.logout(request, { redirectTo: "/" }); + return null; } -- cgit v1.2.3-70-g09d2