From 8f2cceacc8fde328033de7f05bb12e7b1246dd86 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 1 Aug 2024 22:22:12 +0900 Subject: chore(frontend): [biome] format --- frontend/app/routes/dashboard.tsx | 122 +++++++++++++++++++------------------- 1 file changed, 61 insertions(+), 61 deletions(-) (limited to 'frontend/app/routes/dashboard.tsx') diff --git a/frontend/app/routes/dashboard.tsx b/frontend/app/routes/dashboard.tsx index 1f80634..1c2137d 100644 --- a/frontend/app/routes/dashboard.tsx +++ b/frontend/app/routes/dashboard.tsx @@ -5,72 +5,72 @@ import { apiGetGames } from "../.server/api/client"; import { isAuthenticated } from "../.server/auth"; export const meta: MetaFunction = () => { - return [{ title: "Dashboard | iOSDC Japan 2024 Albatross.swift" }]; + return [{ title: "Dashboard | iOSDC Japan 2024 Albatross.swift" }]; }; export async function loader({ request }: LoaderFunctionArgs) { - const { user, token } = await isAuthenticated(request, { - failureRedirect: "/login", - }); - if (user.is_admin) { - return redirect("/admin/dashboard"); - } - const { games } = await apiGetGames(token); - return { - user, - games, - }; + const { user, token } = await isAuthenticated(request, { + failureRedirect: "/login", + }); + if (user.is_admin) { + return redirect("/admin/dashboard"); + } + const { games } = await apiGetGames(token); + return { + user, + games, + }; } export default function Dashboard() { - const { user, games } = useLoaderData()!; + const { user, games } = useLoaderData()!; - return ( -
-
-

- {user.username}{" "} - {user.is_admin && admin} -

-

User

-
-
    -
  • Name: {user.display_name}
  • -
-
-

Games

-
-
    - {games.map((game) => ( -
  • - {game.display_name}{" "} - {game.state === "closed" || game.state === "finished" ? ( - - Entry - - ) : ( - - Entry - - )} -
  • - ))} -
-
-
-
- -
-
-
-
- ); + return ( +
+
+

+ {user.username}{" "} + {user.is_admin && admin} +

+

User

+
+
    +
  • Name: {user.display_name}
  • +
+
+

Games

+
+
    + {games.map((game) => ( +
  • + {game.display_name}{" "} + {game.state === "closed" || game.state === "finished" ? ( + + Entry + + ) : ( + + Entry + + )} +
  • + ))} +
+
+
+
+ +
+
+
+
+ ); } -- cgit v1.3.1