diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-04 20:49:12 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-04 20:49:12 +0900 |
| commit | ff959dadb1f990173b9df3105ccfc96b1c6c092e (patch) | |
| tree | 4690c2aabafaedb50f86ece4900c9616d9518947 /frontend/app/routes/admin.games.tsx | |
| parent | fa7755592845a44928e88d2ab78cc04425aa9024 (diff) | |
| parent | f4bae7f755ca25b2547dc98b2db2fdb255948bc5 (diff) | |
| download | iosdc-japan-2024-albatross-ff959dadb1f990173b9df3105ccfc96b1c6c092e.tar.gz iosdc-japan-2024-albatross-ff959dadb1f990173b9df3105ccfc96b1c6c092e.tar.zst iosdc-japan-2024-albatross-ff959dadb1f990173b9df3105ccfc96b1c6c092e.zip | |
Merge branch 'feat/admin-pages'
Diffstat (limited to 'frontend/app/routes/admin.games.tsx')
| -rw-r--r-- | frontend/app/routes/admin.games.tsx | 35 |
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> - ); -} |
