Some "wrong login" alerts

This commit is contained in:
Peter KW 2024-04-11 00:35:25 +02:00
parent 0d4d77633d
commit 385ceba248

View file

@ -11,6 +11,10 @@ function LoginCheck(props: {
password: string;
setAuthority: Dispatch<SetStateAction<number>>;
}): void {
if (props.username === "" || props.password === "") {
alert("Please enter username and password to login");
return;
}
const user: NewUser = {
username: props.username,
password: props.password,
@ -43,6 +47,7 @@ function LoginCheck(props: {
}
} else {
console.error("Token could not be fetched/No such user");
alert("Could not login, wrong username or password");
}
})
.catch((error) => {