diff options
Diffstat (limited to 'frontend/app/routes')
| -rw-r--r-- | frontend/app/routes/dashboard.tsx | 3 | ||||
| -rw-r--r-- | frontend/app/routes/golf.$gameId.watch.tsx | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/frontend/app/routes/dashboard.tsx b/frontend/app/routes/dashboard.tsx index e23d7aa..e6a43de 100644 --- a/frontend/app/routes/dashboard.tsx +++ b/frontend/app/routes/dashboard.tsx @@ -42,7 +42,8 @@ export default function Dashboard() { <ul className="list-disc list-inside"> {games.map((game) => ( <li key={game.game_id}> - {game.display_name}{" "} + {game.display_name} + {game.game_type === "multiplayer" ? " (Multiplayer)" : " (1v1)"} {game.state === "closed" || game.state === "finished" ? ( <span className="inline-block px-6 py-2 text-gray-400 bg-gray-200 cursor-not-allowed rounded"> Entry diff --git a/frontend/app/routes/golf.$gameId.watch.tsx b/frontend/app/routes/golf.$gameId.watch.tsx index 83b7a1a..5edf92f 100644 --- a/frontend/app/routes/golf.$gameId.watch.tsx +++ b/frontend/app/routes/golf.$gameId.watch.tsx @@ -25,6 +25,11 @@ export async function loader({ params, request }: LoaderFunctionArgs) { }; const [game, sockToken] = await Promise.all([fetchGame(), fetchSockToken()]); + + if (game.game_type !== "1v1") { + return new Response("Not Found", { status: 404 }); + } + return { game, sockToken, |
