From dd3440009ae75ecc00e10e48b014ef23bb446964 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 4 Aug 2024 17:06:23 +0900 Subject: feat(frontend): remove admin pages --- frontend/app/routes/admin.games.tsx | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 frontend/app/routes/admin.games.tsx (limited to 'frontend/app/routes/admin.games.tsx') 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()!; - - return ( -
-
-

[Admin] Games

-
    - {games.map((game) => ( -
  • - - {game.display_name} (id={game.game_id}) - -
  • - ))} -
-
-
- ); -} -- cgit v1.2.3-70-g09d2