From a9059e611352d4d309a94a9e43cd72611902062c Mon Sep 17 00:00:00 2001 From: kayra1 Date: Fri, 2 Aug 2024 19:05:07 +0300 Subject: [PATCH] better login page --- 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..2c7c136 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