From 91770b99b7a8274763d6a6b667ce2126619f6fd3 Mon Sep 17 00:00:00 2001 From: "Kayashov.SM" Date: Sat, 23 Aug 2025 23:52:04 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=20?= =?UTF-8?q?=D0=BF=D0=BE=D1=80=D1=8F=D0=B4=D0=BE=D0=BA=20=D0=B0=D0=B2=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/components/auth/sign-in-form.js | 4 ++-- front/src/components/core/UserPopover.js | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/front/src/components/auth/sign-in-form.js b/front/src/components/auth/sign-in-form.js index 12d7ddb..4bfda97 100644 --- a/front/src/components/auth/sign-in-form.js +++ b/front/src/components/auth/sign-in-form.js @@ -15,7 +15,7 @@ import {useAuth} from "../../hooks/useAuth"; import {api} from "../../lib/clients/api"; const emptyRequest = { - byLogin: false, + byLogin: true, code: "", login: "", password: "" @@ -25,7 +25,7 @@ export function SignInForm() { const [loading, setLoading] = useState(false); const [error, setError] = useState(null); const [request, setRequest] = useState(emptyRequest); - const [pass, setPass] = useState(false) + const [pass, setPass] = useState(true) const {checkSession} = useAuth(); const buttonSx = { diff --git a/front/src/components/core/UserPopover.js b/front/src/components/core/UserPopover.js index e1f7773..55af152 100644 --- a/front/src/components/core/UserPopover.js +++ b/front/src/components/core/UserPopover.js @@ -85,6 +85,9 @@ export function UserPopover({anchorEl, onClose, open}) { } function userDescriptor(user) { + if(!user) { + return null; + } if (!user.name) { return (Гость); }