another style improvement for login page

This commit is contained in:
2025-09-04 18:14:20 +03:00
parent b887ac2624
commit 841f350b17
3 changed files with 32 additions and 26 deletions

View File

@ -24,9 +24,10 @@ const Login = () => {
const handleSubmit = (e: React.FormEvent) => {
e.preventDefault();
setUsernameEmpty(!username);
setPasswordEmpty(!password);
if (!username || !password) {
if (!username) setUsernameEmpty(true);
if (!password) setPasswordEmpty(true);
return;
}
@ -49,13 +50,9 @@ const Login = () => {
</div>
<div className="login-right">
<h2 className="login-logo-block">
I'm logo!!
<img className="login-logo" src="./myautag.png" alt="Picrinth logo" />
</h2>
{/* <img className="login-logo-block" src="./myautag.png" alt="logo" /> */}
<div className="login-login-block">
<h2>
Login
</h2>
<form onSubmit={handleSubmit}
style={{
flexDirection: "column",
@ -73,7 +70,7 @@ const Login = () => {
required
showError={usernameEmpty}
errorMessage="Please enter your username"
/>
/>
<FormField
type="password"
placeholder="Password"
@ -82,11 +79,14 @@ const Login = () => {
required
showError={passwordEmpty}
errorMessage="Please enter your password"
/>
/>
<button type="submit" className="login-button">
Login
</button>
</form>
<h2 style={{textAlign: "center"}}>
<a href="http://localhost:5173/register" className="login-link">Create account</a>
</h2>
</div>
<div className="login-links-block">
<h2>
@ -96,7 +96,7 @@ const Login = () => {
<a href="https://git.frik.su/Beesquit/picrinth-server" className="login-link">Backend</a>
</h2>
<h2>
<a href="https://git.frik.su/Beesquit" className="login-link">Creator profile</a>
<a href="https://git.frik.su/Beesquit" className="login-link">Author</a>
</h2>
</div>
</div>