From e11996cc4e4b96b30053c4819737bb56c0d9b748 Mon Sep 17 00:00:00 2001 From: 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 Date: Mon, 22 Apr 2024 12:10:00 +0200 Subject: [PATCH] login hotfix --- webapp/src/components/AddUser.jsx | 89 ++++++++++++++++--------------- webapp/src/components/Login.jsx | 77 +++++++++++++++----------- 2 files changed, 93 insertions(+), 73 deletions(-) diff --git a/webapp/src/components/AddUser.jsx b/webapp/src/components/AddUser.jsx index e8b2a28..b3bda9f 100644 --- a/webapp/src/components/AddUser.jsx +++ b/webapp/src/components/AddUser.jsx @@ -41,47 +41,52 @@ const AddUser = () => { return ( -
-
-
-
- Logo -
-

WIQ

+ + + Register + + setUsername(e.target.value)} + /> + setEmail(e.target.value)} + /> + setPassword(e.target.value)} + /> + -
Sign up for an account on WIQ.
-
-
- -
- setUsername(e.target.value)} class="pl-12 mb-2 bg-gray-50 text-gray-600 border focus:border-transparent border-gray-300 sm:text-sm rounded-lg ring ring-transparent focus:ring-1 focus:outline-none focus:ring-gray-400 block w-full p-2.5 rounded-l-lg py-3 px-4" placeholder="Username" /> -
-
-
- -
- setEmail(e.target.value)} class="pl-12 mb-2 bg-gray-50 text-gray-600 border focus:border-transparent border-gray-300 sm:text-sm rounded-lg ring ring-transparent focus:ring-1 focus:outline-none focus:ring-gray-400 block w-full p-2.5 rounded-l-lg py-3 px-4" placeholder="name@example.com" /> -
-
-
- -
- setPassword(e.target.value)} placeholder="••••••••••" class="pl-12 mb-2 bg-gray-50 text-gray-600 border focus:border-transparent border-gray-300 sm:text-sm rounded-lg ring ring-transparent focus:ring-1 focus:outline-none focus:ring-gray-400 block w-full p-2.5 rounded-l-lg py-3 px-4" autocomplete="new-password" /> -
-
-
- -
- setcPassword(e.target.value)} placeholder="••••••••••" class="pl-12 mb-2 bg-gray-50 text-gray-600 border focus:border-transparent border-gray-300 sm:text-sm rounded-lg ring ring-transparent focus:ring-1 focus:outline-none focus:ring-gray-400 block w-full p-2.5 rounded-l-lg py-3 px-4" autocomplete="new-password" /> -
-
- -
Already have an account? Login - -
-
-
+ margin="normal" + fullWidth + label="Confirm Password" + type="password" + value={cpassword} + onChange={(e) => setcPassword(e.target.value)} + /> + + + Already have an account? Log in here. + { @@ -89,8 +94,8 @@ const AddUser = () => { setError('')} message={`Error: ${error}`} /> ) } -
- // + + ); }; diff --git a/webapp/src/components/Login.jsx b/webapp/src/components/Login.jsx index da04949..94d0db5 100644 --- a/webapp/src/components/Login.jsx +++ b/webapp/src/components/Login.jsx @@ -61,45 +61,60 @@ const Login = () => { }; return ( - -
-
-
-
- Logo -
-

WIQ

-
-
Acces to WIQ with your account.
-
-
- -
- setUsername(e.target.value)} class="pl-12 mb-2 bg-gray-50 text-gray-600 border focus:border-transparent border-gray-300 sm:text-sm rounded-lg ring ring-transparent focus:ring-1 focus:outline-none focus:ring-gray-400 block w-full p-2.5 rounded-l-lg py-3 px-4" placeholder="Username" /> -
-
- -
- -
- setPassword(e.target.value)} placeholder="••••••••••" class="pl-12 mb-2 bg-gray-50 text-gray-600 border focus:border-transparent border-gray-300 sm:text-sm rounded-lg ring ring-transparent focus:ring-1 focus:outline-none focus:ring-gray-400 block w-full p-2.5 rounded-l-lg py-3 px-4" autocomplete="new-password" /> -
-
- - -
Are you new around here? Sign Up + + + Register + + setUsername(e.target.value)} + /> + setEmail(e.target.value)} + /> + setPassword(e.target.value)} + /> + - -
+ margin="normal" + fullWidth + label="Confirm Password" + type="password" + value={cpassword} + onChange={(e) => setcPassword(e.target.value)} + /> + + + Already have an account? Log in here. + {error && ( setError('')} message={`Error: ${error}`} /> )} -
+ ); };