From 1c4afd78b2aee298f1706232c1ea40008e5cd0bf Mon Sep 17 00:00:00 2001 From: Kayra Date: Mon, 5 Aug 2024 21:58:15 +0300 Subject: [PATCH] chore: better login page (#51) --- ui/src/app/login/page.tsx | 78 ++++++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 33 deletions(-) diff --git a/ui/src/app/login/page.tsx b/ui/src/app/login/page.tsx index 8820e2b..f423c1e 100644 --- a/ui/src/app/login/page.tsx +++ b/ui/src/app/login/page.tsx @@ -7,6 +7,7 @@ import { useCookies } from "react-cookie" import { useRouter } from "next/navigation" import { useAuth } from "../auth/authContext" import { statusResponse } from "../types" +import { Logo } from "../nav" export default function LoginPage() { @@ -40,41 +41,52 @@ export default function LoginPage() { const handleUsernameChange = (event: ChangeEvent) => { setUsername(event.target.value) } const handlePasswordChange = (event: ChangeEvent) => { setPassword(event.target.value) } return ( -
-
-
-

Login

+ <> +
+
+
-
-
-
- - - - - {errorText && -
-
-
Error
-

{errorText.split("error: ")}

-
-
- } - -
+
+
+
+
+
+
+
+

Login

+ + + + + {errorText && +
+
+
Error
+

{errorText.split("error: ")}

+
+
+ } + {password.length != 0 && username.length != 0 ? ( + + ) : ( + + )} +
+
+
-
+
-
+ ) } \ No newline at end of file