From f106dfda762b499af52a741f682c34abb83d27d9 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 28 Jul 2024 02:24:13 +0900 Subject: frontend: impl /login and /dashboard --- frontend/app/routes/_index.tsx | 19 +++++++++++++- frontend/app/routes/dashboard.tsx | 33 +++++++++++++++++++---- frontend/app/routes/login.tsx | 55 ++++++++++++++++++++++++++++++++------- 3 files changed, 91 insertions(+), 16 deletions(-) (limited to 'frontend') diff --git a/frontend/app/routes/_index.tsx b/frontend/app/routes/_index.tsx index f39c7eb..f5a46ca 100644 --- a/frontend/app/routes/_index.tsx +++ b/frontend/app/routes/_index.tsx @@ -1,9 +1,26 @@ import type { MetaFunction } from "@remix-run/node"; +import { Link } from "@remix-run/react"; export const meta: MetaFunction = () => { return [{ title: "Albatross.swift" }]; }; export default function Index() { - return

iOSDC 2024 Albatross.swift

; + return ( +
+
+

+ iOSDC 2024 Albatross.swift +

+

+ + Login + +

+
+
+ ); } diff --git a/frontend/app/routes/dashboard.tsx b/frontend/app/routes/dashboard.tsx index 535642c..7fda6d7 100644 --- a/frontend/app/routes/dashboard.tsx +++ b/frontend/app/routes/dashboard.tsx @@ -12,11 +12,34 @@ export default function Dashboard() { const user = useLoaderData()!; return ( -
-

- #{user.userId} {user.displayUsername} (@{user.username}) -

- {user.isAdmin &&

Admin

} +
+
+

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

+

User

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

Team

+
+
    +
  • Name: {user.displayUsername}
  • +
  • + Members: {user.displayUsername} ({user.username}) +
  • +
+
+

Game

+
+
    +
  • TODO
  • +
+
+
); } diff --git a/frontend/app/routes/login.tsx b/frontend/app/routes/login.tsx index 0da2616..40ad66f 100644 --- a/frontend/app/routes/login.tsx +++ b/frontend/app/routes/login.tsx @@ -17,15 +17,50 @@ export async function action({ request }: ActionFunctionArgs) { export default function Login() { return ( -
- - - -
+
+
+

Login

+
+ + +
+
+ + +
+ +
+
); } -- cgit v1.2.3-70-g09d2