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 (Гость); }