From b128e4b4cd4e3e259b390c60b292afdf4e9152e6 Mon Sep 17 00:00:00 2001 From: kurpfish Date: Wed, 11 Aug 2021 16:39:54 +0300 Subject: [PATCH] simple auth error handling --- src/components/Auth/AuthForDevelopers.js | 9 +++++++++ src/components/Auth/AuthForDevelopers.module.css | 7 +++++++ src/components/Auth/AuthForPartners.js | 9 +++++++++ src/components/Auth/AuthForPartners.module.css | 7 +++++++ src/server/server.js | 3 ++- 5 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/components/Auth/AuthForDevelopers.js b/src/components/Auth/AuthForDevelopers.js index 65be31e8..0a49388e 100644 --- a/src/components/Auth/AuthForDevelopers.js +++ b/src/components/Auth/AuthForDevelopers.js @@ -27,6 +27,7 @@ const AuthForDevelopers = () => { const [username, setUsername] = useState('') const [password, setPassword] = useState('') + const [error, setError] = useState(null); if(isAuth) { return @@ -67,6 +68,10 @@ const AuthForDevelopers = () => { onChange={(e) => setPassword(e.target.value)} /> + { error &&
+ {error} +
} +