From 6031c81f5394acf315b277302a7fd18ea288b506 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 19 Aug 2024 04:40:08 +0900 Subject: refactor(frontend): extract UserIcon component --- frontend/app/routes/dashboard.tsx | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) (limited to 'frontend/app/routes/dashboard.tsx') diff --git a/frontend/app/routes/dashboard.tsx b/frontend/app/routes/dashboard.tsx index 7aa77fd..3a50757 100644 --- a/frontend/app/routes/dashboard.tsx +++ b/frontend/app/routes/dashboard.tsx @@ -4,6 +4,7 @@ import { apiGetGames } from "../.server/api/client"; import { ensureUserLoggedIn } from "../.server/auth"; import BorderedContainer from "../components/BorderedContainer"; import NavigateLink from "../components/NavigateLink"; +import UserIcon from "../components/UserIcon"; export const meta: MetaFunction = () => [ { title: "Dashboard | iOSDC Japan 2024 Albatross.swift" }, @@ -22,23 +23,19 @@ export default function Dashboard() { const { user, games } = useLoaderData()!; return ( -
+
{user.icon_path && ( - {`${user.display_name} )} -

+

{user.display_name} @{user.username}

-

試合

+

試合

{games.length === 0 ? ( @@ -77,16 +74,14 @@ export default function Dashboard() { )}
-
-
- -
-
+
+ +
{user.is_admin && ( Admin Dashboard -- cgit v1.2.3-70-g09d2