diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-01 01:19:09 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-01 01:19:09 +0900 |
| commit | 222ed4e77c3564c95450361fdeca40a733ce65c9 (patch) | |
| tree | be7fe2a9b1a66553f7cda5a462afef801b6cf438 /frontend/app/routes/admin.games_.$gameId.tsx | |
| parent | 5fc739292bdd65da2d33f1e9a4c2b1b33576fdf6 (diff) | |
| parent | f5b6c2f14d3521e9763ba7a356b8e87ebc6d7cd9 (diff) | |
| download | phperkaigi-2025-albatross-222ed4e77c3564c95450361fdeca40a733ce65c9.tar.gz phperkaigi-2025-albatross-222ed4e77c3564c95450361fdeca40a733ce65c9.tar.zst phperkaigi-2025-albatross-222ed4e77c3564c95450361fdeca40a733ce65c9.zip | |
Merge branch 'feat/game-starting'
Diffstat (limited to 'frontend/app/routes/admin.games_.$gameId.tsx')
| -rw-r--r-- | frontend/app/routes/admin.games_.$gameId.tsx | 39 |
1 files changed, 22 insertions, 17 deletions
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() { </ul> <div> <Form method="post"> - <button - type="submit" - name="action" - value="open" - disabled={game.state !== "closed"} - > - Open - </button> - <button - type="submit" - name="action" - value="start" - disabled={game.state !== "waiting_start"} - > - Start - </button> + <div> + <button + type="submit" + name="action" + value="open" + disabled={game.state !== "closed"} + > + Open + </button> + </div> + <div> + <button + type="submit" + name="action" + value="start" + disabled={game.state !== "waiting_start"} + > + Start + </button> + </div> </Form> </div> </div> |
