Some "wrong login" alerts
This commit is contained in:
parent
0d4d77633d
commit
385ceba248
1 changed files with 5 additions and 0 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue