Merge pull request 'Refactor the error messages (fix #102)' (#103) from refactor/errormessage into main
Reviewed-on: #103
This commit is contained in:
commit
942c22c515
2 changed files with 4 additions and 2 deletions
|
@ -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"
|
||||
/>
|
||||
<br />
|
||||
<p className="errorMessage">{errorMessage}</p>
|
||||
<ErrorMessage message={errorMessage}/>
|
||||
<SubmitField onClick={onSubmitClick} LabelName="Einloggen" />
|
||||
</form>
|
||||
) : (
|
||||
|
|
|
@ -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 && <p className="errorMessage">{errorMessage}</p>}
|
||||
{!isStatusOk && <ErrorMessage message={errorMessage} />}
|
||||
<InputField
|
||||
LabelName="Passwort"
|
||||
InputType="password"
|
||||
|
|
Loading…
Reference in a new issue