diff --git a/frontend/src/components/pages/Login.js b/frontend/src/components/pages/Login.js index 41deceb..cd399ee 100644 --- a/frontend/src/components/pages/Login.js +++ b/frontend/src/components/pages/Login.js @@ -6,6 +6,7 @@ import InputField from "../InputField"; import SubmitField from "../SubmitField"; import { login, useAuth, logout } from "../../auth/AuthProvider"; import Secret from "./Secret"; +import ErrorMessage from "../ErrorMessage"; export default function Login() { const [username, setUsername] = useState(""); @@ -65,7 +66,7 @@ export default function Login() { InputPlaceHolder="Passwort" />
-

{errorMessage}

+ ) : ( diff --git a/frontend/src/components/pages/Register.js b/frontend/src/components/pages/Register.js index 310601c..5d6f241 100644 --- a/frontend/src/components/pages/Register.js +++ b/frontend/src/components/pages/Register.js @@ -5,6 +5,7 @@ import Footer from "../../Footer"; import InputField from "../InputField"; import SubmitField from "../SubmitField"; import "../Input.css"; +import ErrorMessage from "../ErrorMessage"; export default function Login() { const [username, setUsername] = useState(""); @@ -61,7 +62,7 @@ export default function Login() { onChange={handleUsernameChange} InputName="username" /> - {!isStatusOk &&

{errorMessage}

} + {!isStatusOk && }