diff options
| author | physcik <mynameisgennadiy@vk.com> | 2026-05-05 11:39:54 +0500 |
|---|---|---|
| committer | physcik <mynameisgennadiy@vk.com> | 2026-05-05 11:39:54 +0500 |
| commit | 164b76fad806b078aad8c537ba9bdcfbfc757dca (patch) | |
| tree | 9e3d38765c307a88792c8e98c22a4d4673a03e40 /front/src/Authentication/RegisterPage.tsx | |
| parent | b82265994c5f72c40f68c6b3a4960869b6a67951 (diff) | |
css changes + error handling
Diffstat (limited to 'front/src/Authentication/RegisterPage.tsx')
| -rw-r--r-- | front/src/Authentication/RegisterPage.tsx | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/front/src/Authentication/RegisterPage.tsx b/front/src/Authentication/RegisterPage.tsx index 5c818f6..10864cd 100644 --- a/front/src/Authentication/RegisterPage.tsx +++ b/front/src/Authentication/RegisterPage.tsx @@ -1,3 +1,4 @@ +import './style.css'; import axios, { AxiosError } from "axios"; import { useContext, useState } from "react"; import { useNavigate } from "react-router"; @@ -30,10 +31,15 @@ function RegisterPage() { return ( <div> - <h2> { GetLocalizedString("Username", lang) } </h2> - <input onChange={ev => setUsername(ev.target.value)} /> - <h2> { GetLocalizedString("Password", lang) } </h2> - <input onChange={ev => setPassw(ev.target.value)} /> + <div className="prompt"> + <h2> { GetLocalizedString("Username", lang) } </h2> + <input onChange={ev => setUsername(ev.target.value)} /> + </div> + <p> { GetLocalizedString("*security-warning*", lang) } </p> + <div className="prompt"> + <h2> { GetLocalizedString("Password", lang) } </h2> + <input onChange={ev => setPassw(ev.target.value)} /> + </div> <button onClick={() => { Register(username, passw, (data) => { SetAuthState(data); @@ -66,7 +72,8 @@ async function Register(username: string, passw: string, onSuccess: (data: Authe return } } - return "An unexpected error occured" + onError("An unexpected error occured"); + return; }); } |
