aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app/routes/admin.games.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/app/routes/admin.games.tsx')
-rw-r--r--frontend/app/routes/admin.games.tsx35
1 files changed, 0 insertions, 35 deletions
diff --git a/frontend/app/routes/admin.games.tsx b/frontend/app/routes/admin.games.tsx
deleted file mode 100644
index f9d15f7..0000000
--- a/frontend/app/routes/admin.games.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-import type { LoaderFunctionArgs, MetaFunction } from "@remix-run/node";
-import { Link, useLoaderData } from "@remix-run/react";
-import { adminApiGetGames } from "../.server/api/client";
-import { ensureAdminUserLoggedIn } from "../.server/auth";
-
-export const meta: MetaFunction = () => [
- { title: "[Admin] Games | iOSDC Japan 2024 Albatross.swift" },
-];
-
-export async function loader({ request }: LoaderFunctionArgs) {
- const { token } = await ensureAdminUserLoggedIn(request);
- const { games } = await adminApiGetGames(token);
- return { games };
-}
-
-export default function AdminGames() {
- const { games } = useLoaderData<typeof loader>()!;
-
- return (
- <div>
- <div>
- <h1>[Admin] Games</h1>
- <ul>
- {games.map((game) => (
- <li key={game.game_id}>
- <Link to={`/admin/games/${game.game_id}`}>
- {game.display_name} (id={game.game_id})
- </Link>
- </li>
- ))}
- </ul>
- </div>
- </div>
- );
-}