From 9c14d766a9fddaf54834e7cf3b1edc8a8ca3a833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=B8=D1=82=D0=B0=D0=BB=D0=B8=D0=B9=20=D0=9B=D0=B0?= =?UTF-8?q?=D0=B2=D1=88=D0=BE=D0=BD=D0=BE=D0=BA?= <114582703+valavshonok@users.noreply.github.com> Date: Sun, 26 Oct 2025 07:31:20 +0300 Subject: [PATCH] work register --- src/views/home/auth/Login.tsx | 14 +++++--------- src/views/home/auth/Register.tsx | 14 +++++--------- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/src/views/home/auth/Login.tsx b/src/views/home/auth/Login.tsx index ab68f3b..697ea8a 100644 --- a/src/views/home/auth/Login.tsx +++ b/src/views/home/auth/Login.tsx @@ -32,8 +32,8 @@ const Login = () => { }, [jwt]); const handleLogin = () => { - setErr(err == "" ? "Неверная почта и/или пароль" : ""); - console.log(123); + // setErr(err == "" ? "Неверная почта и/или пароль" : ""); + // console.log(123); setSubmitClicked(true); if (!username || !password) return; @@ -41,10 +41,6 @@ const Login = () => { dispatch(loginUser({ username, password })); }; - const navigateToRegister = () => { - navigate("/home/register"); - }; - return (
@@ -62,8 +58,8 @@ const Login = () => {
- { }} placeholder="example@gmail.com" error={err}/> - { }} placeholder="abCD1234" /> + {setUsername(v)}} placeholder="login"/> + {setPassword(v)}} placeholder="abCD1234" />
{ /> { }} + onClick={() => {}} >
diff --git a/src/views/home/auth/Register.tsx b/src/views/home/auth/Register.tsx index 6b54028..8b82238 100644 --- a/src/views/home/auth/Register.tsx +++ b/src/views/home/auth/Register.tsx @@ -42,10 +42,6 @@ const Register = () => { dispatch(registerUser({ username, email, password })); }; - const navigateToLogin = () => { - navigate("/home/login"); - }; - return (
@@ -63,10 +59,10 @@ const Register = () => {
- { }} placeholder="example@gmail.com" /> - { }} placeholder="login" /> - { }} placeholder="abCD1234" /> - { }} placeholder="abCD1234" /> + {setEmail(v)}} placeholder="example@gmail.com" /> + {setUsername(v)}} placeholder="login" /> + {setPassword(v)}} placeholder="abCD1234" /> + {setConfirmPassword(v)}} placeholder="abCD1234" />
{
{ }} + onClick={() => handleRegister()} text={status === "loading" ? "Регистрация..." : "Регистрация"} disabled={status === "loading"} />